mirror of
https://github.com/jetzig-framework/jetzig.git
synced 2025-05-14 14:06:08 +00:00
Fix admin database schema detection
Fix missing optional database name type when reading from config
This commit is contained in:
parent
b8f3020b2d
commit
f3b56e14ea
@ -15,8 +15,8 @@
|
|||||||
.hash = "12201d75d73aad5e1c996de4d5ae87a00e58479c8d469bc2eeb5fdeeac8857bc09af",
|
.hash = "12201d75d73aad5e1c996de4d5ae87a00e58479c8d469bc2eeb5fdeeac8857bc09af",
|
||||||
},
|
},
|
||||||
.jetquery = .{
|
.jetquery = .{
|
||||||
.url = "https://github.com/jetzig-framework/jetquery/archive/4069610e0aea2dcdf9f73ca55f3aeb96f01fca5e.tar.gz",
|
.url = "https://github.com/jetzig-framework/jetquery/archive/91ab3139ff7914d9bf40b7a08d7b120bac7a2c7d.tar.gz",
|
||||||
.hash = "122043f7b1614c94d311df1153c7702492b30fb56210fafbb80b52ab39de08a25092",
|
.hash = "1220f1473c69e2b3fbdfc61860a451d1729f384e31097c32acdd3c54054e94387000",
|
||||||
},
|
},
|
||||||
.jetcommon = .{
|
.jetcommon = .{
|
||||||
.url = "https://github.com/jetzig-framework/jetcommon/archive/a248776ba56d6cc2b160d593ac3305756adcd26e.tar.gz",
|
.url = "https://github.com/jetzig-framework/jetcommon/archive/a248776ba56d6cc2b160d593ac3305756adcd26e.tar.gz",
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
.hash = "1220411a8c46d95bbf3b6e2059854bcb3c5159d428814099df5294232b9980517e9c",
|
.hash = "1220411a8c46d95bbf3b6e2059854bcb3c5159d428814099df5294232b9980517e9c",
|
||||||
},
|
},
|
||||||
.jetquery = .{
|
.jetquery = .{
|
||||||
.url = "https://github.com/jetzig-framework/jetquery/archive/4069610e0aea2dcdf9f73ca55f3aeb96f01fca5e.tar.gz",
|
.url = "https://github.com/jetzig-framework/jetquery/archive/91ab3139ff7914d9bf40b7a08d7b120bac7a2c7d.tar.gz",
|
||||||
.hash = "122043f7b1614c94d311df1153c7702492b30fb56210fafbb80b52ab39de08a25092",
|
.hash = "1220f1473c69e2b3fbdfc61860a451d1729f384e31097c32acdd3c54054e94387000",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
.paths = .{
|
.paths = .{
|
||||||
|
@ -42,7 +42,7 @@ pub fn main() !void {
|
|||||||
const env = try jetzig.Environment.init(allocator, .{ .silent = true });
|
const env = try jetzig.Environment.init(allocator, .{ .silent = true });
|
||||||
const repo_env = try jetzig.database.repoEnv(env);
|
const repo_env = try jetzig.database.repoEnv(env);
|
||||||
const maybe_database = repo_env.database orelse
|
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 {
|
const database = maybe_database orelse {
|
||||||
std.debug.print("Missing `database` option in `config/database.zig` " ++
|
std.debug.print("Missing `database` option in `config/database.zig` " ++
|
||||||
|
Loading…
x
Reference in New Issue
Block a user