aboutsummaryrefslogtreecommitdiff
path: root/src/http
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2026-11-02 09:05:43 +0100
committerNathan Reiner <nathan@nathanreiner.xyz>2026-11-02 09:05:43 +0100
commitecb79fc433765688cf60ac4ee8ebe38e782641cd (patch)
tree68c954fdc41bdf0b4b8e858c4252fd3b959fb85a /src/http
parent4363d446c1f40515f7830caa644cc4e580841122 (diff)
update to zig 0.17dev
Diffstat (limited to 'src/http')
-rw-r--r--src/http/Parameter.zig4
-rw-r--r--src/http/handler/context.zig2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/http/Parameter.zig b/src/http/Parameter.zig
index 03260b2..9d2845a 100644
--- a/src/http/Parameter.zig
+++ b/src/http/Parameter.zig
@@ -31,10 +31,10 @@ pub fn Struct(comptime route: Route) type {
}
var types: [names.len]type = undefined;
- var attrs: [names.len]std.builtin.Type.StructField.Attributes = undefined;
+ var attrs: [names.len]std.builtin.Type.Struct.FieldAttributes = undefined;
@memset(&types, @This());
- @memset(&attrs, std.builtin.Type.StructField.Attributes{});
+ @memset(&attrs, .{});
return @Struct(.auto, null, names, &types, &attrs);
}
diff --git a/src/http/handler/context.zig b/src/http/handler/context.zig
index 4e55446..890fa52 100644
--- a/src/http/handler/context.zig
+++ b/src/http/handler/context.zig
@@ -40,6 +40,7 @@ pub fn Context(comptime r: anytype) type {
options: *const fn (Request) Response = badRequest,
trace: *const fn (Request) Response = badRequest,
patch: *const fn (Request) Response = badRequest,
+ query: *const fn (Request) Response = badRequest,
pub fn handle(
self: *const @This(),
@@ -66,6 +67,7 @@ pub fn Context(comptime r: anytype) type {
.OPTIONS => self.options,
.TRACE => self.trace,
.PATCH => self.patch,
+ .QUERY => self.query,
})(req);
}