Esempio n. 1
0
 public ActionResult <Column> Create(long boardId, Column column)
 {
     try
     {
         _service.AddColumn(boardId, column);
         return(column);
     }
     catch (BoardNotFoundException ex)
     {
         return(BadRequest(ex));
     }
 }
Esempio n. 2
0
        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());
        }
Esempio n. 3
0
 public void AddColumn(long boardId, IColumn column)
 {
     _columnService.AddColumn(boardId, column);
 }
 public ResponseResult <bool> AddColumn(ColumnDto columnDto)
 {
     return(_service.AddColumn(columnDto));
 }
Esempio n. 5
0
 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);
 }
Esempio n. 6
0
 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);
 }