Skip to content

Commit

Permalink
Merge pull request #18 from erik1110/feature/api
Browse files Browse the repository at this point in the history
[feat] update url and add auth
  • Loading branch information
erik1110 committed Jan 22, 2024
2 parents 173b12c + 660a4c0 commit 298485d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/features/image/image.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import { getHttpResponse } from 'src/utils/successHandler';
'CriticalError',
'系統錯誤,請洽系統管理員',
)
// @UseGuards(AuthGuard('jwt'))
// @ApiBearerAuth()
@UseGuards(AuthGuard('jwt'))
@ApiBearerAuth()
@Controller('/api/v1/image')
export class ImageController {
constructor(
Expand All @@ -38,7 +38,7 @@ export class ImageController {
if (process.env.NODE_ENV === 'dev') {
shortenUrl = `http://localhost:${process.env.PORT}/api/v1/url/`;
} else {
shortenUrl = `https://${process.env.PRODUCTION_URL}/api/v1/url/`;
shortenUrl = `${process.env.PRODUCTION_URL}/api/v1/url/`;
}

const shortenedUrl = await this.urlService.shortenUrl(imageUrl);
Expand Down

0 comments on commit 298485d

Please sign in to comment.