feat: Add ability to edit avatar (#11399)

Co-authored-by: Udit Takkar <[email protected]>
Co-authored-by: Udit Takkar <[email protected]>
This commit is contained in:
authored and GitHub committed 2023-09-22 19:12:35 -04:00
1 parent 0d653afd0c
commit e0c87cf664
8 files changed
+51 -12

No files matched your search

@@ -1,4 +1,5 @@
import prisma from "@calcom/prisma";
import { MembershipRole } from "@calcom/prisma/enums";
// export type OrganisationWithMembers = Awaited<ReturnType<typeof getOrganizationMembers>>;
@@ -9,7 +10,7 @@ export async function isOrganisationAdmin(userId: number, orgId: number) {
where: {
userId,
teamId: orgId,
OR: [{ role: "ADMIN" }, { role: "OWNER" }],
OR: [{ role: MembershipRole.ADMIN }, { role: MembershipRole.OWNER }],
},
})) || false
);
@@ -19,7 +20,7 @@ export async function isOrganisationOwner(userId: number, orgId: number) {
where: {
userId,
teamId: orgId,
role: "OWNER",
role: MembershipRole.OWNER,
},
}));
}