Skip to content

Commit

Permalink
chore(readme): small typo
Browse files Browse the repository at this point in the history
  • Loading branch information
v-checha committed May 16, 2023
1 parent a49a1f4 commit 5130ab9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,13 @@ GET /user/?where=firstName:John
@ApiQuery({ name: 'where', required: false, type: 'string' })
@ApiQuery({ name: 'orderBy', required: false, type: 'string' })
@UseGuards(AccessGuard)
@Serialize(UserEntity)
@Serialize(UserBaseEntity)
@UseAbility(Actions.read, UserEntity)
findAll(
@Query('where', WherePipe) where?: Prisma.UserWhereInput,
@Query('orderBy', OrderByPipe)
orderBy?: Prisma.UserOrderByWithRelationInput,
@Query('where', WherePipe) where?: Prisma.UserWhereInput,
@Query('orderBy', OrderByPipe) orderBy?: Prisma.UserOrderByWithRelationInput,
): Promise<PaginatorTypes.PaginatedResult<User>> {
return this.userService.findAll(where, orderBy);
return this.userService.findAll(where, orderBy);
}
```

Expand Down Expand Up @@ -630,5 +629,3 @@ import { loggingMiddleware } from './logging-middleware';
})
export class AppModule {}
```

Try out the built in [Logging Middleware](/docs/logging-middleware).
7 changes: 4 additions & 3 deletions src/modules/user/user.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,20 @@ import Serialize from '@decorators/serialize.decorator';
import { OrderByPipe, WherePipe } from '@nodeteam/nestjs-pipes';
import { Prisma, User } from '@prisma/client';
import { PaginatorTypes } from '@nodeteam/nestjs-prisma-pagination';
import UserBaseEntity from '@modules/user/entities/user-base.entity';

@ApiTags('User')
@ApiTags('Users')
@ApiBearerAuth()
@ApiBaseResponses()
@Controller('user')
@Controller('users')
export class UserController {
constructor(private readonly userService: UserService) {}

@Get()
@ApiQuery({ name: 'where', required: false, type: 'string' })
@ApiQuery({ name: 'orderBy', required: false, type: 'string' })
@UseGuards(AccessGuard)
@Serialize(UserEntity)
@Serialize(UserBaseEntity)
@UseAbility(Actions.read, UserEntity)
findAll(
@Query('where', WherePipe) where?: Prisma.UserWhereInput,
Expand Down

0 comments on commit 5130ab9

Please sign in to comment.