diff options
| author | Alexander Rolley <arolley35@gmail.com> | 2026-08-05 17:25:27 +0200 |
|---|---|---|
| committer | Alexander Rolley <arolley35@gmail.com> | 2026-08-05 17:25:27 +0200 |
| commit | dc90bc811648da695e4cb47826ea6479cfd22a06 (patch) | |
| tree | 3621725aadb61d267f1e88afb570a4ab3c824ab8 /src/api/hello-param.zig | |
| parent | 23ac91196552068d44bab5677a09a106b8172e27 (diff) | |
| parent | 9b63c0f568832085b75ea6e3e983dc6cbeccfea4 (diff) | |
Merge branch 'dev' of https://git.nathanreiner.xyz/memora into develop
Diffstat (limited to 'src/api/hello-param.zig')
| -rw-r--r-- | src/api/hello-param.zig | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/api/hello-param.zig b/src/api/hello-param.zig index ba798af..b67212b 100644 --- a/src/api/hello-param.zig +++ b/src/api/hello-param.zig @@ -8,7 +8,9 @@ pub const ctx: Ctx = .{ }; fn get(request: Ctx.Request) Response { - const value = request.params.value.as(usize) catch return .bad_request(.string("parameter needs to be an int")); + const value = request.params.value.as(usize) catch return .badRequest(.string("parameter needs to be an int")); - return .ok_or_error(.json(request.arena, .{ .value = value, })); + return .okOrError(.json(request.arena, .{ + .value = value, + })); } |