Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/ass/blame/commit/0c1758cea1aa4d3b310421fbd1a091dbe9e6a3f1/auth.js You should set ROOT_URL correctly, otherwise the web may not work correctly.
ass/auth.js

22 lines
775 B

/**
* Used for global auth management
*/
const fs = require('fs-extra');
const { log, path, arrayEquals } = require('./utils');
const users = require('./auth.json').users || {};
// Monitor auth.json for changes (triggered by running 'npm run new-token')
fs.watch(path('auth.json'), { persistent: false },
(eventType) => eventType === 'change' && fs.readJson(path('auth.json'))
.then((json) => {
if (!(arrayEquals(Object.keys(users), Object.keys(json.users)))) {
Object.keys(json.users).forEach((token) => (!Object.prototype.hasOwnProperty.call(users, token)) && (users[token] = json.users[token]));
log.info('New token added', Object.keys(users)[Object.keys(users).length - 1] || 'No new token');
}
})
.catch(log.c.error));
module.exports = users;