mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-06-18 16:01:55 +02:00
feat: internal utility functions for token management (creation, deletion, etc)
Including tests
This commit is contained in:
@@ -112,7 +112,7 @@ settingsController.social = async function (req, res) {
|
||||
|
||||
settingsController.api = async (req, res) => {
|
||||
const { tokens } = await meta.settings.get('core.api');
|
||||
const scores = await api.utils.getLastSeen(tokens.map(t => t.token));
|
||||
const scores = await api.utils.tokens.getLastSeen(tokens.map(t => t.token));
|
||||
|
||||
const [lastSeen, lastSeenISO] = tokens.reduce((memo, cur, idx) => {
|
||||
memo[0][cur.token] = scores[idx];
|
||||
|
||||
Reference in New Issue
Block a user