diff --git a/app/api/groups.tsx b/app/api/groups.tsx index e765761..aa0e4db 100644 --- a/app/api/groups.tsx +++ b/app/api/groups.tsx @@ -3,7 +3,7 @@ import { Group } from '@/app/lib/definitions'; export function loadGroups(onLoad?: (groups: Group[]) => void) { - fetch("/api/groups.json") + fetch("/api/groups") .then((response) => response.json()) .then((data) => { onLoad && onLoad(data.map((record: any) => { diff --git a/app/api/guests.tsx b/app/api/guests.tsx index 4d91fac..37d0126 100644 --- a/app/api/guests.tsx +++ b/app/api/guests.tsx @@ -4,7 +4,7 @@ import { Guest } from '@/app/lib/definitions'; import { getCsrfToken } from '@/app/lib/utils'; export function loadGuests(onLoad?: (guests: Guest[]) => void) { - fetch("/api/guests.json") + fetch("/api/guests") .then((response) => response.json()) .then((data) => { onLoad && onLoad(data.map((record: any) => { diff --git a/tests/guests.spec.ts b/tests/guests.spec.ts index 5fc76bc..734f623 100644 --- a/tests/guests.spec.ts +++ b/tests/guests.spec.ts @@ -1,7 +1,7 @@ import { test, expect, Page } from '@playwright/test' const mockGuestsAPI = ({ page }: { page: Page }) => { - page.route('*/**/api/guests.json', async route => { + page.route('*/**/api/guests', async route => { const json = [ { "id": "f4a09c28-40ea-4553-90a5-96935a59cac6",