diff options
author | Michael Hunteman <michael@huntm.net> | 2024-05-17 15:20:30 -0700 |
---|---|---|
committer | Michael Hunteman <michael@huntm.net> | 2024-05-17 15:20:30 -0700 |
commit | 7103019890960e793deefb64987a09b33be60b42 (patch) | |
tree | c1c9402aa250c68b2cbe13d62598232bbf20b1e2 /src/mocks | |
parent | fc5c111bcfe296bec82e1cf9fdb88fc80fb24f89 (diff) |
Add golang server
Diffstat (limited to 'src/mocks')
-rw-r--r-- | src/mocks/browser.ts | 4 | ||||
-rw-r--r-- | src/mocks/handlers.ts | 32 |
2 files changed, 0 insertions, 36 deletions
diff --git a/src/mocks/browser.ts b/src/mocks/browser.ts deleted file mode 100644 index 0a56427..0000000 --- a/src/mocks/browser.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { setupWorker } from 'msw/browser'; -import { handlers } from './handlers'; - -export const worker = setupWorker(...handlers); diff --git a/src/mocks/handlers.ts b/src/mocks/handlers.ts deleted file mode 100644 index e3569df..0000000 --- a/src/mocks/handlers.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { http, HttpResponse } from 'msw'; -import { nanoid } from '@reduxjs/toolkit'; - -const token = nanoid(); - -export const handlers = [ - http.post('/guest-login', () => { - return HttpResponse.json({ - guest: { - id: 1, - firstName: 'Michael', - lastName: 'Hunteman', - attendance: 'false', - meal: '', - email: '', - message: '', - }, - token, - }); - }), - http.patch('/guests/1', () => { - return HttpResponse.json({ - id: 1, - firstName: 'Michael', - lastName: 'Hunteman', - attendance: 'true', - meal: 'beef', - email: '', - message: '', - }); - }), -]; |