mirror of
https://github.com/documenso/documenso.git
synced 2025-11-22 04:31:39 +10:00
28 lines
718 B
TypeScript
28 lines
718 B
TypeScript
import { z } from 'zod';
|
|
|
|
import { deleteTeamPending } from '@documenso/lib/server-only/team/delete-team-pending';
|
|
|
|
import { authenticatedProcedure } from '../trpc';
|
|
|
|
export const ZDeleteTeamPendingRequestSchema = z.object({
|
|
pendingTeamId: z.number(),
|
|
});
|
|
|
|
export const deleteTeamPendingRoute = authenticatedProcedure
|
|
// .meta({
|
|
// openapi: {
|
|
// method: 'POST',
|
|
// path: '/team/pending/{pendingTeamId}/delete',
|
|
// summary: 'Delete pending team',
|
|
// description: '',
|
|
// tags: ['Teams'],
|
|
// },
|
|
// })
|
|
.input(ZDeleteTeamPendingRequestSchema)
|
|
.mutation(async ({ input, ctx }) => {
|
|
return await deleteTeamPending({
|
|
userId: ctx.user.id,
|
|
...input,
|
|
});
|
|
});
|