mirror of
https://github.com/documenso/documenso.git
synced 2025-11-20 19:51:32 +10:00
fix: wip
This commit is contained in:
18
packages/trpc/server/team-router/update-team.ts
Normal file
18
packages/trpc/server/team-router/update-team.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { updateTeam } from '@documenso/lib/server-only/team/update-team';
|
||||
|
||||
import { authenticatedProcedure } from '../trpc';
|
||||
import { ZUpdateTeamRequestSchema, ZUpdateTeamResponseSchema } from './update-team.types';
|
||||
|
||||
export const updateTeamRoute = authenticatedProcedure
|
||||
// .meta(updateTeamMeta)
|
||||
.input(ZUpdateTeamRequestSchema)
|
||||
.output(ZUpdateTeamResponseSchema)
|
||||
.mutation(async ({ input, ctx }) => {
|
||||
const { teamId, data } = input;
|
||||
|
||||
await updateTeam({
|
||||
userId: ctx.user.id,
|
||||
teamId,
|
||||
data,
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user