Merge branch 'main' of http://113.45.157.195:3003/insiinc/re-mooc
This commit is contained in:
commit
05b62881ef
|
@ -58,13 +58,13 @@ export class PostRouter {
|
||||||
const { staff } = ctx;
|
const { staff } = ctx;
|
||||||
return await this.postService.update(input, staff);
|
return await this.postService.update(input, staff);
|
||||||
}),
|
}),
|
||||||
findById: this.trpc.protectProcedure
|
findById: this.trpc.procedure
|
||||||
.input(z.object({ id: z.string(), args: PostFindFirstArgsSchema }))
|
.input(z.object({ id: z.string(), args: PostFindFirstArgsSchema }))
|
||||||
.query(async ({ ctx, input }) => {
|
.query(async ({ ctx, input }) => {
|
||||||
const { staff } = ctx;
|
const { staff } = ctx;
|
||||||
return await this.postService.findById(input.id, input.args);
|
return await this.postService.findById(input.id, input.args);
|
||||||
}),
|
}),
|
||||||
findMany: this.trpc.protectProcedure
|
findMany: this.trpc.procedure
|
||||||
.input(PostFindManyArgsSchema)
|
.input(PostFindManyArgsSchema)
|
||||||
.query(async ({ ctx, input }) => {
|
.query(async ({ ctx, input }) => {
|
||||||
const { staff } = ctx;
|
const { staff } = ctx;
|
||||||
|
@ -84,7 +84,7 @@ export class PostRouter {
|
||||||
.mutation(async ({ input }) => {
|
.mutation(async ({ input }) => {
|
||||||
return await this.postService.deleteMany(input);
|
return await this.postService.deleteMany(input);
|
||||||
}),
|
}),
|
||||||
findManyWithCursor: this.trpc.protectProcedure
|
findManyWithCursor: this.trpc.procedure
|
||||||
.input(
|
.input(
|
||||||
z.object({
|
z.object({
|
||||||
cursor: z.any().nullish(),
|
cursor: z.any().nullish(),
|
||||||
|
|
Loading…
Reference in New Issue