1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-03 21:10:05 +00:00

chore: conditionally call authorize middleware from authenticateToken

This commit is contained in:
2022-07-04 20:13:46 +05:00
parent b10e932605
commit e42fdd3575
9 changed files with 79 additions and 75 deletions

View File

@@ -5,6 +5,8 @@ import { AppStreamConfig } from '../types'
import { getAppStreamConfigPath } from './file'
export const loadAppStreamConfig = async () => {
process.appStreamConfig = {}
if (process.env.NODE_ENV === 'test') return
const appStreamConfigPath = getAppStreamConfigPath()
@@ -21,7 +23,6 @@ export const loadAppStreamConfig = async () => {
} catch (_) {
appStreamConfig = {}
}
process.appStreamConfig = {}
for (const [streamServiceName, entry] of Object.entries(appStreamConfig)) {
const { appLoc, streamWebFolder, streamLogo } = entry