u
This commit is contained in:
@@ -39,6 +39,14 @@ export function clearCachedUser(authId) {
|
||||
userCache.delete(authId);
|
||||
}
|
||||
|
||||
export function clearCachedCompanyUsers(companyId) {
|
||||
for (const [k, v] of userCache) {
|
||||
if (v.user?.selectedCompanyId === companyId) {
|
||||
userCache.delete(k);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function respondWithAuthPayload(res, req, status, body) {
|
||||
if (req.path === '/api/auth/me') {
|
||||
return respondWithAuthenticatedUser(res, status, body);
|
||||
|
||||
Reference in New Issue
Block a user