mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-20 02:05:21 -04:00
parent
557386f78f
commit
e2155e735d
65 changed files with 834 additions and 467 deletions
|
@ -8,8 +8,8 @@ export const getBackendConfig: () => Promise<BackendConfigState> = async () => {
|
|||
return await response.json() as Promise<BackendConfigState>
|
||||
}
|
||||
|
||||
export const getFrontendConfig: () => Promise<FrontendConfigState> = async () => {
|
||||
const response = await fetch('config.json')
|
||||
export const getFrontendConfig: (baseUrl: string) => Promise<FrontendConfigState> = async (baseUrl) => {
|
||||
const response = await fetch(`${baseUrl}config.json`)
|
||||
expectResponseCode(response)
|
||||
return await response.json() as Promise<FrontendConfigState>
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ export interface meResponse {
|
|||
photo: string
|
||||
}
|
||||
|
||||
export const postEmailLogin: ((email: string, password: string) => Promise<void>) = async (email, password) => {
|
||||
export const postEmailLogin = async (email: string, password: string):Promise<void> => {
|
||||
const response = await fetch(getBackendUrl() + '/auth/email', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue