Skip to content
Snippets Groups Projects
Commit 5fb48fc5 authored by Xiao Gui's avatar Xiao Gui
Browse files

bugfix: authready reference

parent 00be430c
No related branches found
No related tags found
No related merge requests found
......@@ -45,14 +45,16 @@ app.use((req, _, next) => {
* async function, but can start server without
*/
let authReady
const _ = (async () => {
/**
* load env first, then load other modules
*/
const { configureAuth, ready: authReady } = require('./auth')
const { configureAuth, ready } = require('./auth')
authReady = ready
const store = await (async () => {
const { USE_DEFAULT_MEMORY_STORE } = process.env
......@@ -199,7 +201,7 @@ app.get('/', (req, res, next) => {
app.use('/logo', require('./logo'))
app.get('/ready', async (req, res) => {
const authIsReady = await authReady()
const authIsReady = authReady ? await authReady() : false
const regionalFeatureReady = await regionalFeatureIsReady()
const datasetReady = await datasetRouteIsReady()
const allReady = [
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment