summaryrefslogtreecommitdiff
path: root/backend/src/API
diff options
context:
space:
mode:
Diffstat (limited to 'backend/src/API')
-rw-r--r--backend/src/API/WeaponsAPI.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/src/API/WeaponsAPI.zig b/backend/src/API/WeaponsAPI.zig
index c15738e..75cd6e8 100644
--- a/backend/src/API/WeaponsAPI.zig
+++ b/backend/src/API/WeaponsAPI.zig
@@ -48,7 +48,7 @@ fn newRangedWeapon(_: *Handler.Handler, req: *httpz.Request, res: *httpz.Respons
var weapon = body.ToModel();
db.RangedWeapons.Create(&weapon) catch |err| {
if (err == db.ResultErrors.AlreadyExists) {
- res.status = 400;
+ res.setStatus(.bad_request);
try res.json(errDesc.ErrorDescriptor {
.Message = "A weapon with that ID already exists"
}, .{});