moved stringtobool

9c0993908ad4827aba523d5cee371dafbf41532b

BPplays <andymalbp@gmail.com>

1 files changed, +1 -5Showing whitespace changes
server.js+1 -5
@@ -68,6 +68,7 @@ import {
6868 forwardFetchResponse,
6969 removeColorFormatting,
7070 getSeparator,
71+ stringToBool,
7172} from './src/util.js';
7273import { UPLOADS_DIRECTORY } from './src/constants.js';
7374import { ensureThumbnailCache } from './src/endpoints/thumbnails.js';
@@ -244,11 +245,6 @@ app.use(helmet({
244245app.use(compression());
245246app.use(responseTime());
246247
247-function stringToBool(str) {
248- if (str === 'true') return true;
249- if (str === 'false') return false;
250- return str;
251-}
252248
253249const server_port = cliArguments.port ?? process.env.SILLY_TAVERN_PORT ?? getConfigValue('port', DEFAULT_PORT);
254250const autorun = (cliArguments.autorun ?? getConfigValue('autorun', DEFAULT_AUTORUN)) && !cliArguments.ssl;