Patched a refresh issue

This commit is contained in:
2021-08-09 20:23:05 +10:00
parent 4ec55bed10
commit c1155909be
4 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -4,12 +4,12 @@ const { tokens } = require('../database/models');
const generate = require('./token-generate');
const destroy = require('./token-destroy');
module.exports = (token, callback) => {
module.exports = async (token, callback) => {
if (!token) {
return callback(401);
}
const tokenRecord = tokens.findOne({
const tokenRecord = await tokens.findOne({
where: {
token: token || ''
}