public async Task <ActionResult <AuthorVerification> > CreateVerification([FromBody] AuthorVerification verificationDto) { await _unitOfWork.AuthorVerifications.CreateAsync(verificationDto); await _unitOfWork.CommitAsync(); return(NoContent()); }
public async Task <ActionResult> UpdateVerification([FromBody] AuthorVerification verificationDto, [FromRoute] int id) { try { var verification = await _unitOfWork.AuthorVerifications.GetByIdAsync(id); verification.PromptText = verificationDto.PromptText; verification.Response = verificationDto.Response; verification.VerificationStatusId = verificationDto.VerificationStatusId; await _unitOfWork.CommitAsync(); return(NoContent()); } catch (EntityNotFoundException) { return(NotFound()); } }