Skip to content

Commit

Permalink
Add api key auth to all bearer points (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmthecoder authored Oct 7, 2024
1 parent d62c9e8 commit 8def261
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/api-gateway/src/modules/auth/auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class AuthController implements OnModuleInit {
type: 'string',
},
})
@ApiBearerAuth()
@ApiBearerAuth('API_Key')
async getJWT(@Headers('Authorization') apiKey?: string) {
const key = apiKey?.replace('Bearer ', '');
if (key === undefined) {
Expand Down Expand Up @@ -157,7 +157,7 @@ export class AuthController implements OnModuleInit {
type: 'string',
},
})
@ApiBearerAuth()
@ApiBearerAuth('API_Key')
@Delete('/key')
async deleteApiKey(@Headers('Authorization') apiKey?: string) {
const key = apiKey?.replace('Bearer ', '');
Expand Down
2 changes: 1 addition & 1 deletion packages/api-gateway/src/modules/email/email.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { ApiKey } from 'src/decorators/api_key.decorator';

const { EMAIL_SERVICE_NAME } = EmailProto;

@ApiBearerAuth()
@ApiBearerAuth('API_Key')
@ApiTags('email')
@Controller('email')
export class EmailController implements OnModuleInit {
Expand Down

0 comments on commit 8def261

Please sign in to comment.