refactor(SW-188): replace anon or auth procedure with serviceProcedure

This commit is contained in:
Chuma McPhoy
2024-08-13 15:59:07 +02:00
parent a1a0a73e3a
commit ed379202c8
7 changed files with 55 additions and 80 deletions

View File

@@ -9,7 +9,7 @@ import type {
} from "@/types/fetch"
import type { Endpoint } from "./endpoints"
export { endpoints, getHotelEndpoint } from "./endpoints"
export { endpoints } from "./endpoints"
const defaultOptions: RequestInit = {
cache: "no-store",
@@ -27,7 +27,7 @@ const fetch = fetchRetry(global.fetch, {
})
export async function get(
endpoint: Endpoint,
endpoint: Endpoint | `${Endpoint}/${string}`,
options: RequestOptionsWithOutBody,
params?: URLSearchParams
) {