no implicit any - force return
add some comments
This commit is contained in:
parent
5dbbd34d3a
commit
f2ec5b644d
@ -95,7 +95,8 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
// 'multiline-ternary': [1, 'always-multiline'],
|
"@typescript-eslint/no-explicit-any": "error",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": "error",
|
||||||
|
|
||||||
// General
|
// General
|
||||||
'comma-dangle': [1, 'never'], // allow or disallow trailing commas
|
'comma-dangle': [1, 'never'], // allow or disallow trailing commas
|
||||||
|
@ -24,6 +24,7 @@ func NewCustomStore() oauth2.ClientStore {
|
|||||||
|
|
||||||
func (a *CustomClientStore) GetByID(id string) (oauth2.ClientInfo, error) {
|
func (a *CustomClientStore) GetByID(id string) (oauth2.ClientInfo, error) {
|
||||||
password := settings.GetPassword()
|
password := settings.GetPassword()
|
||||||
|
// if password not set assign default password
|
||||||
if password == nil {
|
if password == nil {
|
||||||
defaultpassword := "openmediacenter"
|
defaultpassword := "openmediacenter"
|
||||||
password = &defaultpassword
|
password = &defaultpassword
|
||||||
|
@ -3,7 +3,6 @@ package oauth
|
|||||||
import (
|
import (
|
||||||
"gopkg.in/oauth2.v3/errors"
|
"gopkg.in/oauth2.v3/errors"
|
||||||
"gopkg.in/oauth2.v3/manage"
|
"gopkg.in/oauth2.v3/manage"
|
||||||
//"gopkg.in/oauth2.v3/models"
|
|
||||||
"gopkg.in/oauth2.v3/server"
|
"gopkg.in/oauth2.v3/server"
|
||||||
"gopkg.in/oauth2.v3/store"
|
"gopkg.in/oauth2.v3/store"
|
||||||
"log"
|
"log"
|
||||||
@ -17,18 +16,9 @@ func InitOAuth() {
|
|||||||
// token store
|
// token store
|
||||||
manager.MustTokenStorage(store.NewMemoryTokenStore())
|
manager.MustTokenStorage(store.NewMemoryTokenStore())
|
||||||
|
|
||||||
//clientStore := store.NewClientStore()
|
// create new secretstore
|
||||||
//// todo we need to check here if a password is enabled in db -- when yes set it here!
|
clientStore := NewCustomStore()
|
||||||
//clientStore.Set("openmediacenter", &models.Client{
|
manager.MapClientStorage(clientStore)
|
||||||
// ID: "openmediacenter",
|
|
||||||
// Secret: "openmediacenter",
|
|
||||||
// Domain: "http://localhost:8081",
|
|
||||||
//})
|
|
||||||
//
|
|
||||||
//manager.MapClientStorage(clientStore)
|
|
||||||
|
|
||||||
strtest := NewCustomStore()
|
|
||||||
manager.MapClientStorage(strtest)
|
|
||||||
|
|
||||||
srv = server.NewServer(server.NewConfig(), manager)
|
srv = server.NewServer(server.NewConfig(), manager)
|
||||||
srv.SetClientInfoHandler(server.ClientFormHandler)
|
srv.SetClientInfoHandler(server.ClientFormHandler)
|
||||||
|
17
package.json
17
package.json
@ -39,23 +39,6 @@
|
|||||||
},
|
},
|
||||||
"proxy": "http://127.0.0.1:8081",
|
"proxy": "http://127.0.0.1:8081",
|
||||||
"homepage": "/",
|
"homepage": "/",
|
||||||
"eslintConfig": {
|
|
||||||
"extends": [
|
|
||||||
"react-app",
|
|
||||||
"react-app/jest"
|
|
||||||
],
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"files": [
|
|
||||||
"**/*.ts?(x)"
|
|
||||||
],
|
|
||||||
"rules": {
|
|
||||||
"@typescript-eslint/no-explicit-any": "error",
|
|
||||||
"@typescript-eslint/explicit-function-return-type": "error"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"browserslist": {
|
"browserslist": {
|
||||||
"production": [
|
"production": [
|
||||||
">0.2%",
|
">0.2%",
|
||||||
|
@ -60,7 +60,7 @@ class App extends React.Component<{}, state> {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// set the hook to load passwordfield on global func call
|
// set the hook to load passwordfield on global func call
|
||||||
GlobalInfos.loadPasswordPage = (callback?: () => void) => {
|
GlobalInfos.loadPasswordPage = (callback?: () => void): void => {
|
||||||
// try refreshing the token
|
// try refreshing the token
|
||||||
refreshAPIToken((err) => {
|
refreshAPIToken((err) => {
|
||||||
if (err !== '') {
|
if (err !== '') {
|
||||||
|
Loading…
Reference in New Issue
Block a user