mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-08 17:41:58 +02:00
feat: internal utility functions for token management (creation, deletion, etc)
Including tests
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user