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,24 @@
import { findTeamsPending } from '@documenso/lib/server-only/team/find-teams-pending';
import { ZFindSearchParamsSchema } from '@documenso/lib/types/search-params';
import { authenticatedProcedure } from '../trpc';
export const ZFindTeamsPendingRequestSchema = ZFindSearchParamsSchema;
export const findTeamsPendingRoute = authenticatedProcedure
// .meta({
// openapi: {
// method: 'GET',
// path: '/team/pending',
// summary: 'Find pending teams',
// description: 'Find teams that are pending payment',
// tags: ['Teams'],
// },
// })
.input(ZFindTeamsPendingRequestSchema)
.query(async ({ input, ctx }) => {
return await findTeamsPending({
userId: ctx.user.id,
...input,
});
});