diff --git a/backend/src/leaderboard/leaderboard.controller.ts b/backend/src/leaderboard/leaderboard.controller.ts index 239fdbe2..8f590787 100644 --- a/backend/src/leaderboard/leaderboard.controller.ts +++ b/backend/src/leaderboard/leaderboard.controller.ts @@ -1,7 +1,9 @@ -import { Controller, Get, Param } from '@nestjs/common'; +import { Controller, Get, Param, UseGuards } from '@nestjs/common'; import { LeaderboardService } from './leaderboard.service'; +import { AccessTokenGuard } from 'src/auth/jwt/jwt.guard'; @Controller('leaderboard') +@UseGuards(AccessTokenGuard) export class LeaderboardController { constructor(private readonly leaderboardService: LeaderboardService) {} diff --git a/backend/src/match-history/match-history.controller.ts b/backend/src/match-history/match-history.controller.ts index 6760ec20..acdaa68e 100644 --- a/backend/src/match-history/match-history.controller.ts +++ b/backend/src/match-history/match-history.controller.ts @@ -1,9 +1,10 @@ -import { Controller, Get, Post, Body, Param } from '@nestjs/common'; +import { Controller, Get, Post, Body, Param, UseGuards } from '@nestjs/common'; import { MatchHistoryService } from './match-history.service'; import { CreateMatchHistoryDto } from './dto/create-match-history.dto'; +import { AccessTokenGuard } from 'src/auth/jwt/jwt.guard'; -//TODO: add auth guard @Controller('match-history') +@UseGuards(AccessTokenGuard) export class MatchHistoryController { constructor(private readonly matchHistoryService: MatchHistoryService) {}