mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-12 22:26:08 -04:00

* Restructure redux code Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Co-authored-by: Erik Michelson <github@erik.michelson.eu>
8 lines
334 B
TypeScript
8 lines
334 B
TypeScript
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>
|
|
}
|