refactor: abstract exception capture out of is-still-verified
This commit is contained in:
@@ -2,13 +2,9 @@ import { IGlobalVariable } from '@automatisch/types';
|
||||
import getCurrentUser from '../common/get-current-user';
|
||||
|
||||
const isStillVerified = async ($: IGlobalVariable) => {
|
||||
try {
|
||||
await getCurrentUser($);
|
||||
await getCurrentUser($);
|
||||
|
||||
return true;
|
||||
} catch (error) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
export default isStillVerified;
|
||||
|
Reference in New Issue
Block a user