Files
calendar/packages/app-store/huddle01video/api/add.ts
T
9382b862e4 feat: Updated Huddle01 App Flow (#16907)
* fix: migrated to new flow

* feat: apis added

* fix: meetingId

* fix: working with apis

* fix: appName

* fix: WEB APP URL

* fix: update url

* fix: remove logs

* feat: remove lock file

* fix: lock file

* fix: override buildErrors

* fix: removed lock file

* fix: migrated to new flow

* feat: apis added

* fix: meetingId

* fix: working with apis

* fix: appName

* fix: WEB APP URL

* fix: update url

* fix: remove logs

* feat: remove lock file

* fix: lock file

* fix: override buildErrors

* fix: yarn install, lock file

* temp: debugging issue

* feat: api updated

* fix: updated endpoints

* fix: reverted changes

* revert: yarn.lock

* feat: readme

* Update yarn.lock remove spacing

* fix: spacing

---------

Co-authored-by: Akash Mondal <akmo3901@gmail.com>
2024-10-22 11:50:16 +00:00

28 lines
750 B
TypeScript

import type { NextApiRequest } from "next";
import { stringify } from "querystring";
import { WEBAPP_URL } from "@calcom/lib/constants";
import { defaultHandler, defaultResponder } from "@calcom/lib/server";
import { encodeOAuthState } from "../../_utils/oauth/encodeOAuthState";
async function handler(req: NextApiRequest) {
const state = encodeOAuthState(req);
const params = {
response_type: "code",
redirect_uri: `${WEBAPP_URL}/api/integrations/huddle01video/callback`,
state,
appName: "Calcom",
};
const query = stringify(params);
const url = `https://huddle01.app/thirdparty_auth?${query}`;
return { url };
}
export default defaultHandler({
GET: Promise.resolve({ default: defaultResponder(handler) }),
});