authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2022-01-24 20:48:23 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2022-01-24 20:48:23 -08:00
logce408d3b7b8a01506a2bf7f907fe7bda1bca970b
tree9f38b490a0e206f129d73919196aab6083174e1b
parent3aca350ab15651d3b0085ec0657e069f45dc29fc

pek now takes context param


1 files changed, 2 insertions(+), 1 deletions(-)

src/lib.zig+2-1
...@@ -9,6 +9,7 @@ const uri = @import("uri");...@@ -9,6 +9,7 @@ const uri = @import("uri");
9const zfetch = @import("zfetch");9const zfetch = @import("zfetch");
10const json = @import("json");10const json = @import("json");
11const extras = @import("extras");11const extras = @import("extras");
12const Base = @This();
1213
13pub const Provider = struct {14pub const Provider = struct {
14 id: string,15 id: string,
...@@ -245,7 +246,7 @@ pub fn Handlers(comptime T: type) type {...@@ -245,7 +246,7 @@ pub fn Handlers(comptime T: type) type {
245 try response.headers.put("Content-Type", "text/html");246 try response.headers.put("Content-Type", "text/html");
246 const page = files.@"/selector.pek";247 const page = files.@"/selector.pek";
247 const tmpl = comptime pek.parse(page);248 const tmpl = comptime pek.parse(page);
248 try pek.compile(alloc, response.writer(), tmpl, .{249 try pek.compile(Base, alloc, response.writer(), tmpl, .{
249 .clients = Self.clients,250 .clients = Self.clients,
250 });251 });
251 }252 }