File tree 3 files changed +7
-7
lines changed
3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export const swagger = (app: NestExpressApplication): void => {
9
9
. addTag ( 'auth' )
10
10
. addTag ( 'books' )
11
11
. addTag ( 'users' )
12
- . addBasicAuth ( )
12
+ . addBearerAuth ( )
13
13
. build ( ) ;
14
14
const document = SwaggerModule . createDocument ( app , config ) ;
15
15
SwaggerModule . setup ( 'api/docs' , app , document ) ;
Original file line number Diff line number Diff line change @@ -20,13 +20,13 @@ import { FindByIdBookService } from '@/modules/books/services/find-by-id/find-by
20
20
import { UpdateBookDto } from '@/modules/books/dtos/update-book.dto' ;
21
21
import { UpdateBookService } from '@/modules/books/services/update-book/update-book.service' ;
22
22
import { DeleteBookService } from '@/modules/books/services/delete-book/delete-book.service' ;
23
- import { ApiBasicAuth , ApiResponse , ApiTags } from '@nestjs/swagger' ;
23
+ import { ApiBearerAuth , ApiResponse , ApiTags } from '@nestjs/swagger' ;
24
24
import { JwtAuthGuard } from '@/modules/auth/guards/auth.guard' ;
25
25
import { Cache } from 'cache-manager' ;
26
26
import { ProcessBook } from '../process/books.process' ;
27
27
28
28
@ApiTags ( 'books' )
29
- @ApiBasicAuth ( )
29
+ @ApiBearerAuth ( )
30
30
@Controller ( 'books' )
31
31
@UseGuards ( JwtAuthGuard )
32
32
export class BooksController {
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import { User } from '@/modules/users/schemas/user.schema';
14
14
import { AddUserService } from '@/modules/users/services/add-user/add-user.service' ;
15
15
import { FindAllUsersService } from '../services/find-all-users/find-all-users.service' ;
16
16
import { FindUserByIdService } from '../services/find-user-by-id/find-user-by-id.service' ;
17
- import { ApiBasicAuth , ApiResponse , ApiTags } from '@nestjs/swagger' ;
17
+ import { ApiBearerAuth , ApiResponse , ApiTags } from '@nestjs/swagger' ;
18
18
import { JwtAuthGuard } from '@/modules/auth/guards/auth.guard' ;
19
19
import { FileInterceptor } from '@nestjs/platform-express' ;
20
20
import { UploadAvatarService } from '../services/upload-avatar/upload-avatar.service' ;
@@ -43,7 +43,7 @@ export class UsersController {
43
43
}
44
44
45
45
@Get ( )
46
- @ApiBasicAuth ( )
46
+ @ApiBearerAuth ( )
47
47
@ApiResponse ( {
48
48
status : HttpStatus . OK ,
49
49
description : 'find all users.' ,
@@ -58,7 +58,7 @@ export class UsersController {
58
58
}
59
59
60
60
@Get ( ':_id' )
61
- @ApiBasicAuth ( )
61
+ @ApiBearerAuth ( )
62
62
@ApiResponse ( {
63
63
status : HttpStatus . OK ,
64
64
description : 'find users by id.' ,
@@ -73,7 +73,7 @@ export class UsersController {
73
73
}
74
74
75
75
@Post ( '/:_id/upload' )
76
- @ApiBasicAuth ( )
76
+ @ApiBearerAuth ( )
77
77
@ApiResponse ( {
78
78
status : HttpStatus . OK ,
79
79
description : 'upload file S3' ,
You can’t perform that action at this time.
0 commit comments