diff --git a/playground/server/api/register-precog/index.post.ts b/playground/server/api/register-precog/index.post.ts index 0ed3a39..5a0439c 100644 --- a/playground/server/api/register-precog/index.post.ts +++ b/playground/server/api/register-precog/index.post.ts @@ -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) { diff --git a/playground/server/api/registrations/index.post.ts b/playground/server/api/registrations/index.post.ts index 3b4b8d8..ccf7d3a 100644 --- a/playground/server/api/registrations/index.post.ts +++ b/playground/server/api/registrations/index.post.ts @@ -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