diff --git a/client/src/api/api.ts b/client/src/api/api.ts index 38f38a23e2..17d2fea15c 100644 --- a/client/src/api/api.ts +++ b/client/src/api/api.ts @@ -9617,7 +9617,7 @@ export const CoursesTasksApiAxiosParamCreator = function (configuration?: Config assertParamExists('getMyCrossCheckFeedbacks', 'courseId', courseId) // verify required parameter 'courseTaskId' is not null or undefined assertParamExists('getMyCrossCheckFeedbacks', 'courseTaskId', courseTaskId) - const localVarPath = `/courses/{courseId}/cross-checks/{courseTaskId}/myFeedbacks` + const localVarPath = `/courses/{courseId}/cross-checks/{courseTaskId}/feedbacks/my` .replace(`{${"courseId"}}`, encodeURIComponent(String(courseId))) .replace(`{${"courseTaskId"}}`, encodeURIComponent(String(courseTaskId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. diff --git a/nestjs/src/courses/cross-checks/course-cross-checks.controller.ts b/nestjs/src/courses/cross-checks/course-cross-checks.controller.ts index b500be0eb2..a749514552 100644 --- a/nestjs/src/courses/cross-checks/course-cross-checks.controller.ts +++ b/nestjs/src/courses/cross-checks/course-cross-checks.controller.ts @@ -20,6 +20,7 @@ import { AvailableReviewStatsDto } from './dto/available-review-stats.dto'; import { parseAsync } from 'json2csv'; import { Response } from 'express'; import { StudentId } from 'src/core/decorators'; +import { FeedbackGuard } from './cross-check-feedback.guard'; @Controller('courses/:courseId/cross-checks') @ApiTags('courses tasks') @@ -109,7 +110,7 @@ export class CourseCrossCheckController { @ApiForbiddenResponse() @ApiResponse({ type: CrossCheckFeedbackDto }) @RequiredRoles([CourseRole.Manager, Role.Admin, CourseRole.Student], true) - @UseGuards(DefaultGuard, RoleGuard) + @UseGuards(DefaultGuard, RoleGuard, FeedbackGuard) public async getMyCrossCheckFeedbacks( @StudentId() studentId: number, @Param('courseId', ParseIntPipe) _courseId: number, diff --git a/nestjs/src/spec.json b/nestjs/src/spec.json index f4d1663f48..12cdca82a6 100644 --- a/nestjs/src/spec.json +++ b/nestjs/src/spec.json @@ -687,7 +687,7 @@ "tags": ["courses tasks"] } }, - "/courses/{courseId}/cross-checks/{courseTaskId}/myFeedbacks": { + "/courses/{courseId}/cross-checks/{courseTaskId}/feedbacks/my": { "get": { "operationId": "getMyCrossCheckFeedbacks", "summary": "",