public ActionResult <Column> Create(long boardId, Column column) { try { _service.AddColumn(boardId, column); return(column); } catch (BoardNotFoundException ex) { return(BadRequest(ex)); } }
public string Post([FromBody] JObject value) { var dict = value.ToObject <Dictionary <string, SerColumn> >(); if (dict != null) { return(JsonConvert.SerializeObject(new StatusResponse { Status = true, NewItemId = _service.AddColumn(dict["column"]) })); } return(StatusResponse.FalseResponse()); }
public void AddColumn(long boardId, IColumn column) { _columnService.AddColumn(boardId, column); }
public ResponseResult <bool> AddColumn(ColumnDto columnDto) { return(_service.AddColumn(columnDto)); }
public async Task AddColumnToUser(long userId, Column column) { var user = GetUser(userId) ?? throw new ArgumentException("Cannot find user"); await _columnService.AddColumn(column, userId, productId : null); }
public async Task AddColumnToProduct(long userID, long productId, Column column) { var user = _userService.GetUser(userID) ?? throw new ArgumentException("Cannot find user"); var product = GetProduct(productId) ?? throw new ArgumentException("Cannot find product"); await _columnService.AddColumn(column, userID, productId); }