feat(strava): add connection verified check
This commit is contained in:
13
packages/backend/src/apps/strava/auth/is-still-verified.ts
Normal file
13
packages/backend/src/apps/strava/auth/is-still-verified.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { IGlobalVariable } from '@automatisch/types';
|
||||
import getCurrentUser from '../common/get-current-user';
|
||||
|
||||
const isStillVerified = async ($: IGlobalVariable) => {
|
||||
try {
|
||||
const user = await getCurrentUser($);
|
||||
return !!user;
|
||||
} catch (error) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
export default isStillVerified;
|
Reference in New Issue
Block a user