fix: Credential Syncing Improvements (#14588)
* Add example app to test credential sync * Fixes * Changes to normalize flow of GoogleCalendar and Zoom * Add unit tests * PR Feedback * credential-sync-more-tests-and-more-apps * Fix yarn.lock * Clear cache * Add test * Fix yarn.lock * Fix 204 handling * Fix yarn.lock --------- Co-authored-by: Joe Au-Yeung <[email protected]>
This commit is contained in:
1 parent
ebbb1dcce3
commit
d47c6b3fdb
44 files changed
+3610
-593
No files matched your search
@@ -24,7 +24,12 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||
return res.status(403).json({ message: "Invalid credential sync secret" });
|
||||
}
|
||||
|
||||
const reqBody = appCredentialWebhookRequestBodySchema.parse(req.body);
|
||||
const reqBodyParsed = appCredentialWebhookRequestBodySchema.safeParse(req.body);
|
||||
if (!reqBodyParsed.success) {
|
||||
return res.status(400).json({ error: reqBodyParsed.error.issues });
|
||||
}
|
||||
|
||||
const reqBody = reqBodyParsed.data;
|
||||
|
||||
const user = await prisma.user.findUnique({ where: { id: reqBody.userId } });
|
||||
|
||||
|
||||
Reference in new issue
Block a user