Editor Basics (#43)

Add basic editor
This commit is contained in:
Philip Molares 2020-05-29 15:44:45 +02:00 committed by GitHub
parent 557386f78f
commit e2155e735d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
65 changed files with 834 additions and 467 deletions

View file

@ -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>
}

View file

@ -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',