Files
automatisch/packages/backend/src/apps/signalwire/auth/verify-credentials.ts
2023-03-13 19:10:20 +00:00

12 lines
344 B
TypeScript

import { IGlobalVariable } from '@automatisch/types';
const verifyCredentials = async ($: IGlobalVariable) => {
const { data } = await $.http.get(`/api/laml/2010-04-01/Accounts/${$.auth.data.accountSid}`);
await $.auth.set({
screenName: `${data.friendly_name} (${$.auth.data.accountSid})`,
});
};
export default verifyCredentials;