Skip to content

Commit f67522d

Browse files
authored
Fix API handler response termination logic (calcom#22575)
1 parent dc5aef0 commit f67522d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/web/pages/api/integrations/[...args].ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
7171
const redirectUrl = handler.redirect?.url ?? undefined;
7272
res.json({ url: redirectUrl, newTab: handler.redirect?.newTab });
7373
}
74-
if (!res.writableEnded) return res.status(200);
75-
return res;
74+
if (!res.writableEnded) res.status(200);
75+
return;
7676
} catch (error) {
7777
console.error(error);
7878
if (error instanceof HttpError) {

0 commit comments

Comments
 (0)