Files
automatisch/packages/backend/src/apps/flickr/auth/is-still-verified.ts
2022-10-22 23:55:06 +02:00

18 lines
402 B
TypeScript

import { IGlobalVariable } from '@automatisch/types';
const isStillVerified = async ($: IGlobalVariable) => {
try {
const params = {
method: 'flickr.test.login',
format: 'json',
nojsoncallback: 1,
}
const response = await $.http.get('/rest', { params });
return !!response.data.user.id;
} catch (error) {
return false;
}
};
export default isStillVerified;