feat: internal utility functions for token management (creation, deletion, etc)

Including tests
This commit is contained in:
Julian Lam
2023-04-28 15:28:00 -04:00
parent e0149462b3
commit 7b8bffd763
4 changed files with 203 additions and 4 deletions

View File

@@ -128,7 +128,7 @@ middleware.prepareAPI = function prepareAPI(req, res, next) {
middleware.logApiUsage = async function logApiUsage(req, res, next) {
if (req.headers.hasOwnProperty('authorization')) {
const [, token] = req.headers.authorization.split(' ');
await api.utils.log(token);
await api.utils.tokens.log(token);
}
next();