Fix admin database schema detection

Fix missing optional database name type when reading from config
This commit is contained in:
Bob Farrell 2024-11-17 10:50:03 +00:00
parent b8f3020b2d
commit f3b56e14ea
3 changed files with 5 additions and 5 deletions

View File

@ -15,8 +15,8 @@
.hash = "12201d75d73aad5e1c996de4d5ae87a00e58479c8d469bc2eeb5fdeeac8857bc09af",
},
.jetquery = .{
.url = "https://github.com/jetzig-framework/jetquery/archive/4069610e0aea2dcdf9f73ca55f3aeb96f01fca5e.tar.gz",
.hash = "122043f7b1614c94d311df1153c7702492b30fb56210fafbb80b52ab39de08a25092",
.url = "https://github.com/jetzig-framework/jetquery/archive/91ab3139ff7914d9bf40b7a08d7b120bac7a2c7d.tar.gz",
.hash = "1220f1473c69e2b3fbdfc61860a451d1729f384e31097c32acdd3c54054e94387000",
},
.jetcommon = .{
.url = "https://github.com/jetzig-framework/jetcommon/archive/a248776ba56d6cc2b160d593ac3305756adcd26e.tar.gz",

View File

@ -9,8 +9,8 @@
.hash = "1220411a8c46d95bbf3b6e2059854bcb3c5159d428814099df5294232b9980517e9c",
},
.jetquery = .{
.url = "https://github.com/jetzig-framework/jetquery/archive/4069610e0aea2dcdf9f73ca55f3aeb96f01fca5e.tar.gz",
.hash = "122043f7b1614c94d311df1153c7702492b30fb56210fafbb80b52ab39de08a25092",
.url = "https://github.com/jetzig-framework/jetquery/archive/91ab3139ff7914d9bf40b7a08d7b120bac7a2c7d.tar.gz",
.hash = "1220f1473c69e2b3fbdfc61860a451d1729f384e31097c32acdd3c54054e94387000",
},
},
.paths = .{

View File

@ -42,7 +42,7 @@ pub fn main() !void {
const env = try jetzig.Environment.init(allocator, .{ .silent = true });
const repo_env = try jetzig.database.repoEnv(env);
const maybe_database = repo_env.database orelse
if (comptime @hasField(@TypeOf(config), "database")) config.database else null;
if (comptime @hasField(@TypeOf(config), "database")) @as(?[]const u8, config.database) else null;
const database = maybe_database orelse {
std.debug.print("Missing `database` option in `config/database.zig` " ++