feat: stripe triggers (payout + transaction)
This commit is contained in:
16
packages/backend/src/apps/stripe/auth/verify-credentials.ts
Normal file
16
packages/backend/src/apps/stripe/auth/verify-credentials.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
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;
|
Reference in New Issue
Block a user