Skip to content

Commit

Permalink
fix: update cross-check api (#2256)
Browse files Browse the repository at this point in the history
  • Loading branch information
valerydluski authored Aug 8, 2023
1 parent bf85afc commit 09bba39
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion nestjs/src/spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@
"tags": ["courses tasks"]
}
},
"/courses/{courseId}/cross-checks/{courseTaskId}/myFeedbacks": {
"/courses/{courseId}/cross-checks/{courseTaskId}/feedbacks/my": {
"get": {
"operationId": "getMyCrossCheckFeedbacks",
"summary": "",
Expand Down

0 comments on commit 09bba39

Please sign in to comment.