Skip to content

Commit

Permalink
Add missing db.write call
Browse files Browse the repository at this point in the history
  • Loading branch information
diamondburned committed Feb 23, 2024
1 parent ad56a57 commit 5d24211
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/routes/api/candies/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ export type AddCookiesRequest = {

export const POST: RequestHandler = async ({ request }) => {
const data = (await request.json()) as AddCookiesRequest;

db.data.candies += data.candies;
await db.write();

return json({
candies: db.data.candies,
Expand Down

0 comments on commit 5d24211

Please sign in to comment.