feat(telegram-bot): add authentication support

This commit is contained in:
Ali BARIN
2022-12-04 16:49:13 +01:00
parent 677880c633
commit 39ac3ff4c2
5 changed files with 57 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
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;