feat: update workspace name
This commit is contained in:
@@ -55,6 +55,22 @@ export const workspaceRouter = createTRPCRouter({
|
||||
code: "INTERNAL_SERVER_ERROR",
|
||||
});
|
||||
|
||||
return result;
|
||||
}),
|
||||
update: protectedProcedure
|
||||
.input(
|
||||
z.object({
|
||||
workspacePublicId: z.string().min(12),
|
||||
name: z.string().min(3).max(24),
|
||||
}),
|
||||
)
|
||||
.mutation(async ({ ctx, input }) => {
|
||||
const result = await workspaceRepo.update(
|
||||
ctx.db,
|
||||
input.workspacePublicId,
|
||||
input.name,
|
||||
);
|
||||
|
||||
return result;
|
||||
}),
|
||||
delete: protectedProcedure
|
||||
|
||||
Reference in New Issue
Block a user