mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 15:14:56 -04:00
better linting (#72)
Improve linting and fix linting errors Signed-off-by: Philip Molares <philip.molares@udo.edu> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
parent
efb6513205
commit
eba59ae622
70 changed files with 2413 additions and 1867 deletions
|
@ -1,20 +1,20 @@
|
|||
import {getBackendConfig, getFrontendConfig} from "../api/config";
|
||||
import {setFrontendConfig} from "../redux/frontend-config/methods";
|
||||
import {setBackendConfig} from "../redux/backend-config/methods";
|
||||
import {getAndSetUser} from "../utils/apiUtils";
|
||||
import { getBackendConfig, getFrontendConfig } from '../api/config'
|
||||
import { setFrontendConfig } from '../redux/frontend-config/methods'
|
||||
import { setBackendConfig } from '../redux/backend-config/methods'
|
||||
import { getAndSetUser } from '../utils/apiUtils'
|
||||
|
||||
export async function loadAllConfig() {
|
||||
const frontendConfig = await getFrontendConfig();
|
||||
if (!frontendConfig) {
|
||||
return Promise.reject("Frontend config empty!");
|
||||
}
|
||||
setFrontendConfig(frontendConfig);
|
||||
export const loadAllConfig: () => Promise<void> = async () => {
|
||||
const frontendConfig = await getFrontendConfig()
|
||||
if (!frontendConfig) {
|
||||
return Promise.reject(new Error('Frontend config empty!'))
|
||||
}
|
||||
setFrontendConfig(frontendConfig)
|
||||
|
||||
const backendConfig = await getBackendConfig()
|
||||
if (!backendConfig) {
|
||||
return Promise.reject("Backend config empty!");
|
||||
}
|
||||
setBackendConfig(backendConfig)
|
||||
const backendConfig = await getBackendConfig()
|
||||
if (!backendConfig) {
|
||||
return Promise.reject(new Error('Backend config empty!'))
|
||||
}
|
||||
setBackendConfig(backendConfig)
|
||||
|
||||
await getAndSetUser();
|
||||
}
|
||||
await getAndSetUser()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue