public async Task <IActionResult> Create([FromBody] CreateList dto) { if (dto == null) { return(BadRequest()); } try { dto.UserId = IdentityHelper.GetUserId(User); } catch (UnauthorizedAccessException) { return(Unauthorized()); } int id = await _listService.CreateAsync(dto, _createValidator); return(StatusCode(201, id)); }