16 lines
398 B
TypeScript
16 lines
398 B
TypeScript
import { prisma } from "@calcom/prisma";
|
|
import { credentialForCalendarServiceSelect } from "@calcom/prisma/selects/credential";
|
|
|
|
export async function getUsersCredentials(userId: number) {
|
|
const credentials = await prisma.credential.findMany({
|
|
where: {
|
|
userId,
|
|
},
|
|
select: credentialForCalendarServiceSelect,
|
|
orderBy: {
|
|
id: "asc",
|
|
},
|
|
});
|
|
return credentials;
|
|
}
|