mirror of
https://github.com/documenso/documenso.git
synced 2025-11-10 04:22:32 +10:00
16 lines
306 B
TypeScript
16 lines
306 B
TypeScript
import { prisma } from '@documenso/prisma';
|
|
|
|
export type GetApiTokenByIdOptions = {
|
|
id: number;
|
|
userId: number;
|
|
};
|
|
|
|
export const getApiTokenById = async ({ id, userId }: GetApiTokenByIdOptions) => {
|
|
return await prisma.apiToken.findFirstOrThrow({
|
|
where: {
|
|
id,
|
|
userId,
|
|
},
|
|
});
|
|
};
|