public ActionResult <Board> editBoards(string boardId, Board editBoards) { try { editBoards.boardId = boardId; return(Ok(_service.Edit(editBoards))); } catch (System.Exception err) { return(BadRequest(err.Message)); } }
public ActionResult <Board> EditBoard([FromBody] Board updated, int id) { try { updated.Id = id; return(Ok(_service.Edit(updated))); } catch (Exception e) { return(BadRequest(e.Message)); } }