mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 19:26:31 -05:00
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
This commit is contained in:
parent
57baf2fab5
commit
c21503848f
2 changed files with 3 additions and 1 deletions
|
@ -3,7 +3,9 @@ import { expectResponseCode, getApiUrl } from '../utils/apiUtils'
|
|||
import { defaultFetchConfig } from './default'
|
||||
|
||||
export const getMe = async (): Promise<meResponse> => {
|
||||
const response = await fetch('/me')
|
||||
const response = await fetch(getApiUrl() + '/me', {
|
||||
...defaultFetchConfig
|
||||
})
|
||||
expectResponseCode(response)
|
||||
return (await response.json()) as meResponse
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue