make most user route a protected procedure
All checks were successful
backend-action / build-image (push) Successful in 29s
All checks were successful
backend-action / build-image (push) Successful in 29s
This commit is contained in:
@@ -54,7 +54,7 @@ export const userRoute = router({
|
||||
updateUser: protectedProcedure
|
||||
.input(userUpdateSchema)
|
||||
.mutation(async ({ input, ctx }) => await updateUser(ctx.user.id, input)),
|
||||
getUser: publicProcedure
|
||||
getUser: protectedProcedure
|
||||
.input(z.object({ userId: z.number() }))
|
||||
.mutation(async ({ input }) => await getUser(input.userId, false)),
|
||||
getSelf: protectedProcedure.mutation(
|
||||
@@ -82,7 +82,7 @@ export const userRoute = router({
|
||||
confirmChangeImage: protectedProcedure.mutation(
|
||||
async ({ ctx }) => await confirmChangeImage(ctx.user.id, ctx.user.image)
|
||||
),
|
||||
getAllUser: publicProcedure
|
||||
getAllUser: protectedProcedure
|
||||
.input(
|
||||
z.object({
|
||||
offset: z.number().default(0),
|
||||
@@ -104,7 +104,7 @@ export const userRoute = router({
|
||||
input.province
|
||||
)
|
||||
),
|
||||
getAllUserCount: publicProcedure
|
||||
getAllUserCount: protectedProcedure
|
||||
.input(
|
||||
z.object({
|
||||
group: z.number().optional(),
|
||||
|
||||
Reference in New Issue
Block a user