mirror of
https://github.com/sasjs/server.git
synced 2026-01-09 07:20:05 +00:00
fix: DB names updates + refresh api is added
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import User from '../model/User'
|
||||
|
||||
export const removeTokensInDB = async (username: string, client_id: string) => {
|
||||
export const removeTokensInDB = async (username: string, clientId: string) => {
|
||||
const user = await User.findOne({ username })
|
||||
|
||||
const tokenObjIndex = user.tokens.findIndex(
|
||||
(tokenObj: any) => tokenObj.clientid === client_id
|
||||
(tokenObj: any) => tokenObj.clientId === clientId
|
||||
)
|
||||
|
||||
if (tokenObjIndex > -1) {
|
||||
|
||||
Reference in New Issue
Block a user