Skip to content

Commit 5130ab9

Browse files
committed
chore(readme): small typo
1 parent a49a1f4 commit 5130ab9

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,13 @@ GET /user/?where=firstName:John
120120
@ApiQuery({ name: 'where', required: false, type: 'string' })
121121
@ApiQuery({ name: 'orderBy', required: false, type: 'string' })
122122
@UseGuards(AccessGuard)
123-
@Serialize(UserEntity)
123+
@Serialize(UserBaseEntity)
124124
@UseAbility(Actions.read, UserEntity)
125125
findAll(
126-
@Query('where', WherePipe) where?: Prisma.UserWhereInput,
127-
@Query('orderBy', OrderByPipe)
128-
orderBy?: Prisma.UserOrderByWithRelationInput,
126+
@Query('where', WherePipe) where?: Prisma.UserWhereInput,
127+
@Query('orderBy', OrderByPipe) orderBy?: Prisma.UserOrderByWithRelationInput,
129128
): Promise<PaginatorTypes.PaginatedResult<User>> {
130-
return this.userService.findAll(where, orderBy);
129+
return this.userService.findAll(where, orderBy);
131130
}
132131
```
133132

@@ -630,5 +629,3 @@ import { loggingMiddleware } from './logging-middleware';
630629
})
631630
export class AppModule {}
632631
```
633-
634-
Try out the built in [Logging Middleware](/docs/logging-middleware).

src/modules/user/user.controller.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,20 @@ import Serialize from '@decorators/serialize.decorator';
88
import { OrderByPipe, WherePipe } from '@nodeteam/nestjs-pipes';
99
import { Prisma, User } from '@prisma/client';
1010
import { PaginatorTypes } from '@nodeteam/nestjs-prisma-pagination';
11+
import UserBaseEntity from '@modules/user/entities/user-base.entity';
1112

12-
@ApiTags('User')
13+
@ApiTags('Users')
1314
@ApiBearerAuth()
1415
@ApiBaseResponses()
15-
@Controller('user')
16+
@Controller('users')
1617
export class UserController {
1718
constructor(private readonly userService: UserService) {}
1819

1920
@Get()
2021
@ApiQuery({ name: 'where', required: false, type: 'string' })
2122
@ApiQuery({ name: 'orderBy', required: false, type: 'string' })
2223
@UseGuards(AccessGuard)
23-
@Serialize(UserEntity)
24+
@Serialize(UserBaseEntity)
2425
@UseAbility(Actions.read, UserEntity)
2526
findAll(
2627
@Query('where', WherePipe) where?: Prisma.UserWhereInput,

0 commit comments

Comments
 (0)