Skip to content

Commit

Permalink
Fix MSW
Browse files Browse the repository at this point in the history
  • Loading branch information
djhi committed May 3, 2024
1 parent ad8097b commit d3c9d75
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/msw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ import { BaseServer } from './BaseServer.js';
export const getMswHandlers = ({
baseUrl = 'http://localhost:3000',
data,
getNewId,
}: {
baseUrl?: string;
data: Record<string, CollectionItem[] | CollectionItem>;
getNewId?: () => number | string;
}) => {
const server = new BaseServer(baseUrl);
const server = new BaseServer(baseUrl, getNewId);
server.init(data);

const collections = Object.keys(data);
Expand Down

0 comments on commit d3c9d75

Please sign in to comment.