Files
automatisch/packages/backend/src/apps/stripe/auth/verify-credentials.ts
2022-11-24 23:23:22 +01:00

17 lines
341 B
TypeScript

import { IGlobalVariable } from '@automatisch/types';
const verifyCredentials = async ($: IGlobalVariable) => {
try {
await $.http.get(
`/v1/events`,
);
} catch (e) {
throw new Error('Invalid secret key')
}
await $.auth.set({
screenName: $.auth.data?.displayName,
});
};
export default verifyCredentials;