Scheduling infrastructure for absolutely everyone.
Populate msteams key in db (#2743)
Joe Au-Yeung498759890f4b
diff --git a/packages/app-store/office365video/api/add.ts b/packages/app-store/office365video/api/add.tsindex eeb7bf948d5..99a8778ba69 100644--- a/packages/app-store/office365video/api/add.ts+++ b/packages/app-store/office365video/api/add.ts@@ -12,7 +12,7 @@ let client_id = "";export default async function handler(req: NextApiRequest, res: NextApiResponse) {if (req.method === "GET") {- const appKeys = await getAppKeysFromSlug("office365-calendar");+ const appKeys = await getAppKeysFromSlug("msteams");if (typeof appKeys.client_id === "string") client_id = appKeys.client_id;if (!client_id) return res.status(400).json({ message: "Office 365 client_id missing." });const state = encodeOAuthState(req);diff --git a/packages/app-store/office365video/api/callback.ts b/packages/app-store/office365video/api/callback.tsindex cb3b55e7d81..d64b55a4431 100644--- a/packages/app-store/office365video/api/callback.ts+++ b/packages/app-store/office365video/api/callback.ts@@ -21,7 +21,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)return;}- const appKeys = await getAppKeysFromSlug("office365-calendar");+ const appKeys = await getAppKeysFromSlug("msteams");if (typeof appKeys.client_id === "string") client_id = appKeys.client_id;if (typeof appKeys.client_secret === "string") client_secret = appKeys.client_secret;if (!client_id) return res.status(400).json({ message: "Office 365 client_id missing." });diff --git a/packages/app-store/office365video/components/AccountDialog.tsx b/packages/app-store/office365video/components/AccountDialog.tsxindex 42d58640215..dc99603b787 100644--- a/packages/app-store/office365video/components/AccountDialog.tsx+++ b/packages/app-store/office365video/components/AccountDialog.tsx@@ -11,12 +11,12 @@ import {import useAddAppMutation from "../../_utils/useAddAppMutation";export function AccountDialog(props: DialogProps) {- const mutation = useAddAppMutation("office365_calendar");+ const mutation = useAddAppMutation("office365_video");return (<Dialog name="Account check" {...props}><DialogContent><DialogHeader- title="Connecting with MS Teams requires a work/school account."+ title="Connecting with MS Teams requires a work/school Microsoft account."subtitle="If you continue with a personal account you will receive an error"/>diff --git a/packages/prisma/seed-app-store.ts b/packages/prisma/seed-app-store.tsindex b990c333b67..87e4b3cc104 100644--- a/packages/prisma/seed-app-store.ts+++ b/packages/prisma/seed-app-store.ts@@ -50,7 +50,10 @@ async function main() {client_id: process.env.MS_GRAPH_CLIENT_ID,client_secret: process.env.MS_GRAPH_CLIENT_SECRET,});- await createApp("msteams", "office365video", ["video"], "office365_video");+ await createApp("msteams", "office365video", ["video"], "office365_video", {+ client_id: process.env.MS_GRAPH_CLIENT_ID,+ client_secret: process.env.MS_GRAPH_CLIENT_SECRET,+ });}// Video appsif (process.env.DAILY_API_KEY) {