Skip to content

Scheduling infrastructure for absolutely everyone.

Update callback.ts to work with AU location (#16664)

Curious George7ff6d6559a15
diff --git a/packages/app-store/zohocalendar/api/callback.ts b/packages/app-store/zohocalendar/api/callback.ts
index ac36514d419..7c9449d1bc3 100644
--- a/packages/app-store/zohocalendar/api/callback.ts
+++ b/packages/app-store/zohocalendar/api/callback.ts
@@ -51,7 +51,16 @@ async function getHandler(req: NextApiRequest, res: NextApiResponse) {
redirect_uri: `${WEBAPP_URL}/api/integrations/${config.slug}/callback`,
code,
};
- const server_location = location === "us" ? "com" : location;
+
+ let server_location;
+
+ if (location === "us") {
+ server_location = "com";
+ } else if (location === "au") {
+ server_location = "com.au";
+ } else {
+ server_location = location;
+ }
const query = stringify(params);