public async Task <ApiResult <string> > AddImageType([FromBody] CmsImgType model) { if (string.IsNullOrEmpty(model.Guid)) { model.Guid = Guid.NewGuid().ToString(); model.AddDate = DateTime.Now; model.Level = string.IsNullOrEmpty(model.ParentGuid) ? 0 : 1; } return(await _imgTypeService.AddAsync(model)); }
public async Task <ApiResult <string> > EditImageType([FromBody] CmsImgType model) { return(await _imgTypeService.UpdateAsync(model)); }
public async Task <IActionResult> EditImageType([FromBody] CmsImgType model) { return(Ok(await _imgTypeService.UpdateAsync(model))); }