public IActionResult Edit([FromBody] DirectoryEdit data) { try { var userData = jwtService.ParseData(this.User); dirService.Edit(data, userData.UserId); return(Ok()); } catch (ServiceException e) { return(BadRequest(e.Message)); } }