Skip to content
Snippets Groups Projects

Resolve "Make assignment with modules endpoint."

2 files
+ 30
0
Compare changes
  • Side-by-side
  • Inline

Files

@@ -122,6 +122,18 @@ public class AssignmentController {
return View.convert(ar.findAllById(ids), AssignmentDetailsDTO.class);
}
/**
* Gets assignments with their associated modules, which comes with other information in the layer 1 DTO.
*
* @param ids The ids of the assignments we want the DTO for.
* @return The ModuleDetailsDTOs for the respective assignments.
*/
@GetMapping("with-modules")
@PreAuthorize("hasAuthority('ASSIGNMENT_READ')")
public List<AssignmentModuleDetailsDTO> getAssignmentsWithModules(@RequestParam Set<Long> ids) {
return View.convert(ar.findAllById(ids), AssignmentModuleDetailsDTO.class);
}
/**
* Deletes an assignment.
*
Loading