mirror of
https://github.com/jetzig-framework/jetzig.git
synced 2025-05-14 14:06:08 +00:00
PR feedback.
This commit is contained in:
parent
31927cdb6b
commit
8ac2afbec2
5
src/app/views/zmpl.manifest.zig
Normal file
5
src/app/views/zmpl.manifest.zig
Normal file
@ -0,0 +1,5 @@
|
||||
// Zmpl template manifest.
|
||||
// This file is automatically generated at build time. Manual edits will be discarded.
|
||||
// This file should _not_ be stored in version control.
|
||||
pub const templates = struct {
|
||||
};
|
@ -39,7 +39,8 @@ fn compileStaticRoutes(allocator: std.mem.Allocator) !void {
|
||||
const view = try route.renderStatic(route, &request);
|
||||
defer view.deinit();
|
||||
|
||||
const dir = try std.fs.cwd().makeOpenPath("static", .{});
|
||||
var dir = try std.fs.cwd().makeOpenPath("static", .{});
|
||||
defer dir.close();
|
||||
|
||||
const json_path = try std.mem.concat(
|
||||
allocator,
|
||||
|
@ -408,6 +408,7 @@ fn matchStaticContent(self: *Self, request: *jetzig.http.Request) !?[]const u8 {
|
||||
else => return err,
|
||||
}
|
||||
};
|
||||
defer static_dir.close();
|
||||
|
||||
// TODO: Use a hashmap to avoid O(n)
|
||||
for (self.routes) |route| {
|
||||
|
Loading…
x
Reference in New Issue
Block a user