public async Task <IActionResult> CreateSignatures(CreateSignaturesDto dto) { if (await _assignmentService.AllowCreateSignatures(dto.AssignmentId, User.UserId(), dto.Signatures)) { await _assignmentService.CreateSignatures(dto.AssignmentId, User.UserId(), dto.Signatures); var allSignatures = await _assignmentRepository.GetSignaturesWithUsersForAssignment(dto.AssignmentId); return(Ok(allSignatures)); } else { return(Forbid()); } }