lint: src/node/handler/APIHandler.js

This commit is contained in:
John McLear 2021-01-21 21:06:52 +00:00 committed by Richard Hansen
parent ee9bb019b2
commit a7d9a703cd

View file

@ -1,3 +1,4 @@
'use strict';
/** /**
* The API Handler handles all API http requests * The API Handler handles all API http requests
*/ */
@ -37,7 +38,8 @@ try {
apikey = fs.readFileSync(apikeyFilename, 'utf8'); apikey = fs.readFileSync(apikeyFilename, 'utf8');
apiHandlerLogger.info(`Api key file read from: "${apikeyFilename}"`); apiHandlerLogger.info(`Api key file read from: "${apikeyFilename}"`);
} catch (e) { } catch (e) {
apiHandlerLogger.info(`Api key file "${apikeyFilename}" not found. Creating with random contents.`); apiHandlerLogger.info(
`Api key file "${apikeyFilename}" not found. Creating with random contents.`);
apikey = randomString(32); apikey = randomString(32);
fs.writeFileSync(apikeyFilename, apikey, 'utf8'); fs.writeFileSync(apikeyFilename, apikey, 'utf8');
} }