Skip to content

Commit

Permalink
fixed imports in example
Browse files Browse the repository at this point in the history
  • Loading branch information
Smef committed Jun 14, 2024
1 parent b5f415d commit 12d7235
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 1 addition & 4 deletions playground/server/api/register-precog/index.post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,9 @@ export default definePrecognitionEventHandler(registrationSchema, async (event)
email: validated.email,
};

const creatredRegistration = db.insert(registrations).values(newRegistration).returning();

fakeDatabase.push(newRegistration);
// simulate a slow response to show the loading state o the front-end
await sleep(1000);

return creatredRegistration;
});

function sleep(ms: number) {
Expand Down
2 changes: 0 additions & 2 deletions playground/server/api/registrations/index.post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ export default defineEventHandler(async (event) => {
email: validated.email,
};

const fakeDatabase = getFakeDatabase;

fakeDatabase.push(newRegistration);

// simulate a slow response to show the loading state o the front-end
Expand Down

0 comments on commit 12d7235

Please sign in to comment.