示例#1
0
        public async Task <IActionResult> CreateFolder([FromBody] FolderViewModel folderData)
        {
            try
            {
                int folderId = await _foldersService.CreateFolder(folderData);

                return(Ok(folderId));
            }

            catch (Exception ex)
            {
                return(BadRequest(ex));
            }
        }
示例#2
0
 public async Task <IActionResult> CreateFolder([FromBody] CreateFolderVm model)
 {
     return(this.Ok(await _foldersService.CreateFolder(this.CurrentUserId.Value, model)));
 }