-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhandlers.js
22 lines (19 loc) · 888 Bytes
/
handlers.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { http, passthrough, HttpResponse } from 'msw';
import { resourceHandler } from './handlers/resource';
import { apiDelegationHandlers } from './handlers/apiDelegation';
import { userHandlers } from './handlers/user';
import { singlerightHandlers } from './handlers/singleright';
import { accessPackageHandlers } from './handlers/accessPackage';
import { lookupHandlers } from './handlers/lookup';
export const ACCESSMANAGEMENT_BASE_URL = 'http://localhost:6006/accessmanagement/api/v1';
export const handlers = [
...apiDelegationHandlers(ACCESSMANAGEMENT_BASE_URL),
...resourceHandler(ACCESSMANAGEMENT_BASE_URL),
...userHandlers(ACCESSMANAGEMENT_BASE_URL),
...singlerightHandlers(ACCESSMANAGEMENT_BASE_URL),
...accessPackageHandlers(ACCESSMANAGEMENT_BASE_URL),
...lookupHandlers(ACCESSMANAGEMENT_BASE_URL),
http.get('*', () => {
return passthrough();
}),
];