mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-20 18:25:21 -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,38 +1,38 @@
|
|||
import {Reducer} from 'redux';
|
||||
import {BackendConfigActions, BackendConfigState, SET_BACKEND_CONFIG_ACTION_TYPE} from './types';
|
||||
import { Reducer } from 'redux'
|
||||
import { BackendConfigActions, BackendConfigState, SET_BACKEND_CONFIG_ACTION_TYPE } from './types'
|
||||
|
||||
export const initialState: BackendConfigState = {
|
||||
allowAnonymous: true,
|
||||
authProviders: {
|
||||
facebook: false,
|
||||
github: false,
|
||||
twitter: false,
|
||||
gitlab: false,
|
||||
dropbox: false,
|
||||
ldap: false,
|
||||
google: false,
|
||||
saml: false,
|
||||
oauth2: false,
|
||||
email: false,
|
||||
openid: false
|
||||
},
|
||||
customAuthNames: {
|
||||
ldap: "",
|
||||
oauth2: "",
|
||||
saml: ""
|
||||
},
|
||||
specialLinks: {
|
||||
privacy: "",
|
||||
termsOfUse: "",
|
||||
imprint: "",
|
||||
}
|
||||
};
|
||||
allowAnonymous: true,
|
||||
authProviders: {
|
||||
facebook: false,
|
||||
github: false,
|
||||
twitter: false,
|
||||
gitlab: false,
|
||||
dropbox: false,
|
||||
ldap: false,
|
||||
google: false,
|
||||
saml: false,
|
||||
oauth2: false,
|
||||
email: false,
|
||||
openid: false
|
||||
},
|
||||
customAuthNames: {
|
||||
ldap: '',
|
||||
oauth2: '',
|
||||
saml: ''
|
||||
},
|
||||
specialLinks: {
|
||||
privacy: '',
|
||||
termsOfUse: '',
|
||||
imprint: ''
|
||||
}
|
||||
}
|
||||
|
||||
export const BackendConfigReducer: Reducer<BackendConfigState, BackendConfigActions> = (state: BackendConfigState = initialState, action: BackendConfigActions) => {
|
||||
switch (action.type) {
|
||||
case SET_BACKEND_CONFIG_ACTION_TYPE:
|
||||
return action.payload.state;
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
};
|
||||
switch (action.type) {
|
||||
case SET_BACKEND_CONFIG_ACTION_TYPE:
|
||||
return action.payload.state
|
||||
default:
|
||||
return state
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue