public IActionResult UpdateTelefon(int telefonId, [FromBody] TelefonView telefon) { try { DataProvider.UpdateTelefon(telefonId, telefon); return(Ok()); } catch (Exception exception) { return(BadRequest(exception.ToString())); } }
public IActionResult AddTelefon(int narodniPoslanikId, [FromBody] TelefonView telefon) { try { DataProvider.CreateTelefon(narodniPoslanikId, telefon); return(Ok()); } catch (Exception exception) { return(BadRequest(exception.ToString())); } }