mirror of
https://github.com/documenso/documenso.git
synced 2026-10-04 18:54:00 +10:00
<img width="1810" height="1408" alt="image" src="https://github.com/user-attachments/assets/1375ebf6-9aa5-4f02-9b21-8913f71d6634" />
20 lines
616 B
TypeScript
20 lines
616 B
TypeScript
import { adminDeleteRecipient } from '@documenso/lib/server-only/admin/admin-delete-recipient';
|
|
|
|
import { adminProcedure } from '../trpc';
|
|
import { ZDeleteRecipientRequestSchema, ZDeleteRecipientResponseSchema } from './delete-recipient.types';
|
|
|
|
export const deleteRecipientRoute = adminProcedure
|
|
.input(ZDeleteRecipientRequestSchema)
|
|
.output(ZDeleteRecipientResponseSchema)
|
|
.mutation(async ({ input, ctx }) => {
|
|
const { id, reason } = input;
|
|
|
|
ctx.logger.info({ input: { id } });
|
|
|
|
await adminDeleteRecipient({
|
|
recipientId: id,
|
|
reason,
|
|
requestMetadata: ctx.metadata,
|
|
});
|
|
});
|