Change 'accepted' response codes that should not be there to OK

This commit is contained in:
Haze Weathers 2024-12-01 21:22:58 -05:00
parent 33f7e16f86
commit 9c6d07aa6b
2 changed files with 0 additions and 3 deletions

View file

@ -163,7 +163,6 @@ fn postScore(e: *zap.Endpoint, r: zap.Request) void {
self.scores.setScore(level, player, new_score) catch {
return serverError(r, "Error setting score.");
};
r.setStatus(.accepted);
return r.sendBody("Score set!") catch return;
},
error.LevelNotfound => return notFound(r, "Level not found."),
@ -184,7 +183,6 @@ fn postScore(e: *zap.Endpoint, r: zap.Request) void {
self.scores.setScore(level, player, new_score) catch {
return serverError(r, "Error setting score.");
};
r.setStatus(.accepted);
return r.sendBody("Score set!") catch return;
}
}

View file

@ -218,6 +218,5 @@ fn touchPlayer(self: *Self, r: zap.Request, player: []const u8, id_str: []const
};
try tx.put(db, player, std.mem.asBytes(&id), .{});
try tx.commit();
r.setStatus(.accepted);
r.sendBody("Player registered!") catch return;
}