Change schema of url environment variables (#1237)

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2021-05-05 22:33:30 +02:00 committed by GitHub
parent 41e493c8bc
commit a48b4f60bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 33 additions and 33 deletions

View file

@ -11,7 +11,7 @@ import { isMockMode } from '../../utils/test-modes'
export const getNote = async (noteId: string): Promise<NoteDto> => {
// The "-get" suffix is necessary, because in our mock api (filesystem) the note id might already be a folder.
// TODO: [mrdrogdrog] replace -get with actual api route as soon as api backend is ready.
const response = await fetch(getApiUrl() + `/notes/${ noteId }${ isMockMode() ? '-get' : '' }`, {
const response = await fetch(getApiUrl() + `notes/${ noteId }${ isMockMode() ? '-get' : '' }`, {
...defaultFetchConfig
})
expectResponseCode(response)
@ -19,7 +19,7 @@ export const getNote = async (noteId: string): Promise<NoteDto> => {
}
export const deleteNote = async (noteId: string): Promise<void> => {
const response = await fetch(getApiUrl() + `/notes/${ noteId }`, {
const response = await fetch(getApiUrl() + `notes/${ noteId }`, {
...defaultFetchConfig,
method: 'DELETE'
})