Server fix for middleware

This commit is contained in:
rimuspp 2024-02-08 19:09:54 -05:00
parent 9f772c8dbe
commit 0395d00b4b
No known key found for this signature in database
GPG Key ID: F09D8C0DD662A665

View File

@ -4,7 +4,7 @@ const jetzig = @import("../../jetzig.zig");
const root_file = @import("root"); const root_file = @import("root");
const jetzig_server_options = if (@hasDecl(root_file, "jetzig_options")) root_file.jetzig_options else struct {}; const jetzig_server_options = if (@hasDecl(root_file, "jetzig_options")) root_file.jetzig_options else struct {};
const middlewares: []const type = jetzig_server_options.middleware; const middlewares: []const type = if (@hasDecl(jetzig_server_options, "middlewares")) jetzig_server_options.middlewares else &.{};
pub const ServerOptions = struct { pub const ServerOptions = struct {
cache: jetzig.caches.Cache, cache: jetzig.caches.Cache,