aboutsummaryrefslogtreecommitdiff
path: root/src/api/hello-param.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/hello-param.zig')
-rw-r--r--src/api/hello-param.zig6
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,
+ }));
}