diff --git a/api/src/auth_routes.ts b/api/src/auth_routes.ts index c1ec31fc5..d26675b3f 100644 --- a/api/src/auth_routes.ts +++ b/api/src/auth_routes.ts @@ -47,12 +47,6 @@ const AVAILABLE_AUTH_PROVIDER_DISPLAY_INFO: {[name: string]: any} = { }, }; -const HANDLER_OPTIONS: {[name: string]: any} = { - google: { - prompt: 'select_account', - }, -}; - passport.serializeUser((user: Express.User, done: DoneFunction) => { done(null, user.user_id); }); diff --git a/api/src/buildconfig.ts b/api/src/buildconfig.ts index 395a7bd5e..f0ee01f46 100644 --- a/api/src/buildconfig.ts +++ b/api/src/buildconfig.ts @@ -137,7 +137,7 @@ function signing_key_id(): string { // Generate public and private keys file names in the same way as makeInstanceKeys.sh function key_file_path(): string { - let path = process.env.KEY_FILE_PATH; + const path = process.env.KEY_FILE_PATH; if (path === '' || path === undefined) { console.log('KEY_FILE_PATH not set, using default'); return '.'; diff --git a/api/src/couchdb/index.ts b/api/src/couchdb/index.ts index c2721cebf..3c4075f23 100644 --- a/api/src/couchdb/index.ts +++ b/api/src/couchdb/index.ts @@ -28,11 +28,7 @@ import { } from '@faims3/data-model'; import PouchDB from 'pouchdb'; import {initialiseJWTKey} from '../authkeys/initJWTKeys'; -import { - COUCHDB_INTERNAL_URL, - COUCHDB_PUBLIC_URL, - LOCAL_COUCHDB_AUTH, -} from '../buildconfig'; +import {COUCHDB_INTERNAL_URL, LOCAL_COUCHDB_AUTH} from '../buildconfig'; import * as Exceptions from '../exceptions'; import { initialiseAuthDb, diff --git a/api/src/couchdb/initialise.ts b/api/src/couchdb/initialise.ts index fcf177867..c5993129a 100644 --- a/api/src/couchdb/initialise.ts +++ b/api/src/couchdb/initialise.ts @@ -21,7 +21,6 @@ import { AuthDatabaseSecurityDocument, CLUSTER_ADMIN_GROUP_NAME, - getProjectDB, permissionDocument, viewsDocument, } from '@faims3/data-model'; @@ -37,7 +36,6 @@ import { getUserFromEmailOrUsername, saveUser, } from './users'; -import {getUsersDB} from '.'; /** * A helper to 1) clear out admins/members 2) add the specified roles 3) save diff --git a/api/src/couchdb/notebooks.ts b/api/src/couchdb/notebooks.ts index 95859e133..fd1c395fe 100644 --- a/api/src/couchdb/notebooks.ts +++ b/api/src/couchdb/notebooks.ts @@ -772,7 +772,6 @@ export const streamNotebookRecordsAsCSV = async ( while (!done) { // record might be null if there was an invalid db entry if (record) { - const hrid = getRecordHRID(record); const row = [ hrid, diff --git a/api/src/routes.ts b/api/src/routes.ts index 49368e5a3..1d7a8998c 100644 --- a/api/src/routes.ts +++ b/api/src/routes.ts @@ -60,7 +60,11 @@ import { requireNotebookMembership, } from './middleware'; import {validateProjectDatabase} from './couchdb/devtools'; -import {databaseValidityReport, initialiseDatabases, verifyCouchDBConnection} from './couchdb'; +import { + databaseValidityReport, + initialiseDatabases, + verifyCouchDBConnection, +} from './couchdb'; export {app}; @@ -76,7 +80,9 @@ app.get('/', async (req, res) => { if (req.user && req.user._id) { // Handlebars is pretty useless at including render logic in templates, just // parse the raw, pre-processed string in... - const rendered_project_roles = render_project_roles(req.user.project_roles); + const rendered_project_roles = render_project_roles( + req.user.project_roles + ); const provider = Object.keys(req.user.profiles)[0]; // No need for a refresh here const token = await generateUserToken(req.user, false); @@ -112,7 +118,6 @@ app.get('/', async (req, res) => { * even call initialiseDatabases, just redirect home */ app.post('/fallback-initialise', async (req, res) => { - if (!databaseValidityReport.valid) { console.log('running initialise'); await initialiseDatabases(); diff --git a/app/src/App.tsx b/app/src/App.tsx index 709576b00..3629aa7a1 100644 --- a/app/src/App.tsx +++ b/app/src/App.tsx @@ -43,7 +43,7 @@ import {AuthReturn} from './gui/components/authentication/auth_return'; import CreateNewSurvey from './gui/components/workspace/CreateNewSurvey'; import NotFound404 from './gui/pages/404'; import {AppUrlListener} from './native_hooks'; -import { NotificationProvider } from './context/popup'; +import {NotificationProvider} from './context/popup'; // type AppProps = {}; diff --git a/app/src/gui/components/authentication/appbarAuth.tsx b/app/src/gui/components/authentication/appbarAuth.tsx index 4c2565fd1..d73946a72 100644 --- a/app/src/gui/components/authentication/appbarAuth.tsx +++ b/app/src/gui/components/authentication/appbarAuth.tsx @@ -26,11 +26,9 @@ import {checkToken} from '../../../utils/helpers'; import {Person} from '@mui/icons-material'; import {theme} from '../../themes'; -interface SignInButtonComponentProps {} -const SignInButtonComponent = (props: SignInButtonComponentProps) => { +const SignInButtonComponent = () => { /** Component: SignInButtonComponent - */ return (