public IActionResult PostDiplomaDocument(DiplomaDocument data) { try { var res = _repository.AddDiplomaDocument(data); if (res == -1) { return(Conflict(409)); } return(Ok(res)); } catch (Exception error) { return(BadRequest(error)); } }