diff options
Diffstat (limited to 'src/api')
| -rw-r--r-- | src/api/hello-json.zig | 2 | ||||
| -rw-r--r-- | src/api/hello-param.zig | 4 | ||||
| -rw-r--r-- | src/api/root.zig | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/api/hello-json.zig b/src/api/hello-json.zig index 6c29ba7..12f1e72 100644 --- a/src/api/hello-json.zig +++ b/src/api/hello-json.zig @@ -2,7 +2,7 @@ const http = @import("http"); const Context = http.handler.Context; const Response = http.Response; -const Ctx = Context(.{ "hello-json" }); +const Ctx = Context(.{"hello-json"}); pub const ctx: Ctx = .{ .get = get, }; diff --git a/src/api/hello-param.zig b/src/api/hello-param.zig index f4de1dd..b67212b 100644 --- a/src/api/hello-param.zig +++ b/src/api/hello-param.zig @@ -10,5 +10,7 @@ pub const ctx: Ctx = .{ fn get(request: Ctx.Request) Response { const value = request.params.value.as(usize) catch return .badRequest(.string("parameter needs to be an int")); - return .okOrError(.json(request.arena, .{ .value = value, })); + return .okOrError(.json(request.arena, .{ + .value = value, + })); } diff --git a/src/api/root.zig b/src/api/root.zig index 7570a76..2a54b91 100644 --- a/src/api/root.zig +++ b/src/api/root.zig @@ -16,7 +16,7 @@ pub const interfaces: []const Interface = ifs: { var ifs: []const Interface = &.{}; for (modules) |module| { - const interface: []const Interface = &.{ module.ctx.interface() }; + const interface: []const Interface = &.{module.ctx.interface()}; ifs = ifs ++ interface; } |