Files
automatisch/packages/backend/src/apps/telegram-bot/auth/verify-credentials.ts
2022-12-04 17:27:58 +01:00

13 lines
288 B
TypeScript

import { IGlobalVariable } from '@automatisch/types';
const verifyCredentials = async ($: IGlobalVariable) => {
const { data } = await $.http.get('/getMe');
const { result: me } = data;
await $.auth.set({
screenName: me.first_name,
});
};
export default verifyCredentials;