Skip to content

Commit

Permalink
fix: logout regex
Browse files Browse the repository at this point in the history
  • Loading branch information
7sete7 committed Feb 20, 2024
1 parent d32a079 commit 45d58c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/imports/auth/logout/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getUser, getHashedToken } from '@imports/auth/getUser';
import { getHashedToken, getUser } from '@imports/auth/getUser';
import { cleanupSessions } from '@imports/auth/login';
import { MetaObject } from '../../model/MetaObject';

Expand All @@ -18,7 +18,7 @@ export async function logout(authTokenId) {

return { success: true };
} catch (error) {
if (/^[get-user]/.test(error.message)) {
if (/^\[get-user\]/.test(error.message)) {
return { success: false, errors: [{ message: 'User not found' }] };
}
throw error;
Expand Down

0 comments on commit 45d58c3

Please sign in to comment.