mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-15 07:34:42 -04:00
Restructure redux code (#109)
* Restructure redux code Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Co-authored-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
db5bec7000
commit
570c45017c
28 changed files with 214 additions and 231 deletions
8
src/api/backend-config/index.ts
Normal file
8
src/api/backend-config/index.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { expectResponseCode, getBackendUrl } from '../../utils/apiUtils'
|
||||
import { BackendConfig } from './types'
|
||||
|
||||
export const getBackendConfig = async (): Promise<BackendConfig> => {
|
||||
const response = await fetch(getBackendUrl() + '/config')
|
||||
expectResponseCode(response)
|
||||
return await response.json() as Promise<BackendConfig>
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue