77using HwProj . APIGateway . API . Models . Solutions ;
88using HwProj . AuthService . Client ;
99using HwProj . CoursesService . Client ;
10- using HwProj . Models . AuthService . DTO ;
1110using HwProj . Models . CoursesService ;
1211using HwProj . Models . CoursesService . DTO ;
1312using HwProj . Models . CoursesService . ViewModels ;
@@ -38,7 +37,7 @@ public SolutionsController(ISolutionsServiceClient solutionsClient, IAuthService
3837 }
3938
4039 [ HttpGet ( "{solutionId}" ) ]
41- [ ProducesResponseType ( typeof ( Solution ) , ( int ) HttpStatusCode . OK ) ]
40+ [ ProducesResponseType ( typeof ( SolutionDto ) , ( int ) HttpStatusCode . OK ) ]
4241 public async Task < IActionResult > GetSolutionById ( long solutionId )
4342 {
4443 var result = await _solutionsClient . GetSolutionById ( solutionId ) ;
@@ -78,7 +77,7 @@ public async Task<IActionResult> GetStudentSolution(long taskId, string studentI
7877
7978 var mentorIds = studentSolutions . Values
8079 . SelectMany ( t => t . Tasks )
81- . SelectMany ( t => t . Solution )
80+ . SelectMany ( t => t . Solutions )
8281 . Select ( t => t . LecturerId ?? "" )
8382 . Where ( x => x != "" )
8483 . Distinct ( )
@@ -88,7 +87,7 @@ public async Task<IActionResult> GetStudentSolution(long taskId, string studentI
8887
8988 var solutionsGroupsIds = studentSolutions . Values
9089 . SelectMany ( t => t . Tasks )
91- . First ( x => x . Id == taskId ) . Solution
90+ . First ( x => x . Id == taskId ) . Solutions
9291 . Select ( s => s . GroupId )
9392 . Distinct ( )
9493 . ToList ( ) ;
@@ -120,7 +119,7 @@ public async Task<IActionResult> GetStudentSolution(long taskId, string studentI
120119 Title = task . Title ,
121120 Tags = task . Tags ,
122121 TaskId = task . Id . ToString ( ) ,
123- Solutions = t . Solution . Select ( s => new GetSolutionModel ( s ,
122+ Solutions = t . Solutions . Select ( s => new GetSolutionModel ( s ,
124123 s . TaskId == taskId && s . GroupId is { } groupId
125124 ? solutionsGroups [ groupId ] . StudentsIds
126125 . Select ( x => accountsCache [ x ] )
0 commit comments