fix: refactor api routes

This commit is contained in:
David Nguyen
2024-12-30 21:01:03 +11:00
parent df33fbf91b
commit 22665543c0
100 changed files with 2268 additions and 2303 deletions

View File

@ -0,0 +1,27 @@
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,
});
});