update Clerk V5

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-04-24 18:26:53 +02:00
parent 288fd6f6d0
commit e2d56fb34f
15 changed files with 360 additions and 330 deletions

View File

@@ -14,17 +14,11 @@ export const userRouter = createTRPCRouter({
})
)
.mutation(({ input, ctx }) => {
return (
clerkClient.users
.updateUser(ctx.session.userId, {
firstName: input.firstName,
lastName: input.lastName,
})
// Typescript issue that is fine for now,
// the properties we need are there
// Will be resolved when we update clerk/nextjs to v5
// @ts-expect-error
.then(transformUser)
);
return clerkClient.users
.updateUser(ctx.session.userId, {
firstName: input.firstName,
lastName: input.lastName,
})
.then(transformUser);
}),
});