2023-11-24 16:13:09 +02:00
|
|
|
import { prisma } from '@documenso/prisma';
|
|
|
|
|
|
|
|
|
|
export type DeleteTokenByIdOptions = {
|
|
|
|
|
id: number;
|
|
|
|
|
userId: number;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const deleteTokenById = async ({ id, userId }: DeleteTokenByIdOptions) => {
|
2023-12-08 13:28:34 +00:00
|
|
|
return await prisma.apiToken.delete({
|
2023-11-24 16:13:09 +02:00
|
|
|
where: {
|
|
|
|
|
id,
|
|
|
|
|
userId,
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
};
|