Skip to content

Commit

Permalink
Fix/event type clone (#5659)
Browse files Browse the repository at this point in the history
* fix: add location query variable

* chore: remove logs

* fix: remove required location

* fix: make locations option

* fix: get location

* Update packages/prisma/zod/custom/eventtype.ts

* Fix location being overrided by default

Co-authored-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>
  • Loading branch information
3 people committed Nov 23, 2022
1 parent 33271a8 commit 1c2c6a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/trpc/server/routers/viewer/eventTypes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,8 @@ export const eventTypesRouter = router({
};

const appKeys = await getAppKeysFromSlug("daily-video");
if (typeof appKeys.api_key === "string") {
// Shouldn't override input locations
if (rest.locations?.length === 0 && typeof appKeys.api_key === "string") {
data.locations = [{ type: DailyLocationType }];
}

Expand Down

0 comments on commit 1c2c6a6

Please sign in to comment.