Moved settings.js to ts.

This commit is contained in:
SamTV12345 2024-02-21 19:56:50 +01:00
parent 4f53142d7f
commit 71c74bc633
40 changed files with 217 additions and 205 deletions

View file

@ -24,7 +24,7 @@ const cloneDeep = require('lodash.clonedeep');
const createHTTPError = require('http-errors');
const apiHandler = require('../../handler/APIHandler');
const settings = require('../../utils/Settings');
import {ssl} 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: `${settings.ssl ? 'https' : 'http'}://${req.headers.host}${apiRoot}`,
url: `${ssl ? 'https' : 'http'}://${req.headers.host}${apiRoot}`,
});