summaryrefslogtreecommitdiff
path: root/src/mocks/handlers.ts
diff options
context:
space:
mode:
authorMichael Hunteman <michael@huntm.net>2024-02-24 10:04:10 -0600
committerMichael Hunteman <michael@huntm.net>2024-02-24 10:18:33 -0600
commit68a86b2f9c41717767443b6b9e1860cb73b2aa30 (patch)
tree33c8d6033a26ec70a1e116d2e1669f2dc12b3744 /src/mocks/handlers.ts
parent589e53f152d7363074049dfd1bd5a34286ae74d6 (diff)
Use RTK query
Diffstat (limited to 'src/mocks/handlers.ts')
-rw-r--r--src/mocks/handlers.ts18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mocks/handlers.ts b/src/mocks/handlers.ts
new file mode 100644
index 0000000..483da83
--- /dev/null
+++ b/src/mocks/handlers.ts
@@ -0,0 +1,18 @@
+import { http, HttpResponse } from 'msw';
+import { nanoid } from '@reduxjs/toolkit';
+
+const token = nanoid();
+
+export const handlers = [
+ http.post('/guest-login', () => {
+ return HttpResponse.json(
+ {
+ user: {
+ firstName: 'Michael',
+ lastName: 'Hunteman'
+ },
+ token
+ }
+ )
+ })
+];