Download manager is now functional

Added UI support for new downloads schema

Implemented draft test for downloads

Cleaned up unused code snippets
This commit is contained in:
Isaac Abadi
2021-08-08 21:29:31 -06:00
parent 5a90be7703
commit 0360469c5a
10 changed files with 288 additions and 182 deletions

View File

@@ -134,7 +134,7 @@ exports.registerUser = async function(req, res) {
exports.login = async (username, password) => {
const user = await db_api.getRecord('users', {name: username});
if (!user) { logger.error(`User ${username} not found`); false }
if (!user) { logger.error(`User ${username} not found`); return false }
if (user.auth_method && user.auth_method !== 'internal') { return false }
return await bcrypt.compare(password, user.passhash) ? user : false;
}