App env fixes

This commit is contained in:
zomars
2022-05-02 17:59:06 -06:00
parent 0213f66eb6
commit fdbfd759af
5 changed files with 54 additions and 28 deletions
@@ -3,12 +3,8 @@ import short from "short-uuid";
import { v5 as uuidv5 } from "uuid";
import { z } from "zod";
import {
_AvailabilityModel,
_DestinationCalendarModel,
_EventTypeCustomInputModel,
_EventTypeModel,
} from "@calcom/prisma/zod";
import getAppKeysFromSlug from "@calcom/app-store/_utils/getAppKeysFromSlug";
import { _DestinationCalendarModel, _EventTypeCustomInputModel, _EventTypeModel } from "@calcom/prisma/zod";
import { stringOrNumber } from "@calcom/prisma/zod-utils";
import { createEventTypeInput } from "@calcom/prisma/zod/custom/eventtype";
@@ -128,7 +124,8 @@ export const eventTypesRouter = createProtectedRouter()
},
};
if (process.env.DAILY_API_KEY) {
const appKeys = await getAppKeysFromSlug("dailyvideo");
if (typeof appKeys.api_key === "string") {
data.locations = [{ type: "integrations:daily" }];
}