From c21503848feb53363311ffce28945430b249e34b Mon Sep 17 00:00:00 2001 From: Erik Michelson Date: Mon, 3 Aug 2020 23:40:04 +0200 Subject: [PATCH] Fix me-API-request to use fetch-config and API-path (#381) * Move mocked me-API-response into API dir * Update me-API request to use API path and fetch-config --- public/{ => api/v2}/me | 0 src/api/me.ts | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) rename public/{ => api/v2}/me (100%) diff --git a/public/me b/public/api/v2/me similarity index 100% rename from public/me rename to public/api/v2/me diff --git a/src/api/me.ts b/src/api/me.ts index 5cf5ac25e..0e00a3dbe 100644 --- a/src/api/me.ts +++ b/src/api/me.ts @@ -3,7 +3,9 @@ import { expectResponseCode, getApiUrl } from '../utils/apiUtils' import { defaultFetchConfig } from './default' export const getMe = async (): Promise => { - const response = await fetch('/me') + const response = await fetch(getApiUrl() + '/me', { + ...defaultFetchConfig + }) expectResponseCode(response) return (await response.json()) as meResponse }