Moved settings.js to ts.

This commit is contained in:
SamTV12345 2024-02-21 21:48:51 +01:00
parent 71c74bc633
commit fbf8667019
44 changed files with 852 additions and 760 deletions

View file

@ -24,7 +24,7 @@ const cloneDeep = require('lodash.clonedeep');
const createHTTPError = require('http-errors');
const apiHandler = require('../../handler/APIHandler');
import {ssl} from '../../utils/Settings';
import {settings} from '../../utils/Settings';
const log4js = require('log4js');
const logger = log4js.getLogger('API');
@ -724,5 +724,5 @@ const getApiRootForVersion = (version:string, style:any = APIPathStyle.FLAT): st
const generateServerForApiVersion = (apiRoot:string, req:any): {
url:string
} => ({
url: `${ssl ? 'https' : 'http'}://${req.headers.host}${apiRoot}`,
url: `${settings.ssl ? 'https' : 'http'}://${req.headers.host}${apiRoot}`,
});