public async Task <IActionResult> PostAsync([FromBody] TodoItemViewModel todoItemViewModel)
        {
            var username = httpContextAccessor.HttpContext.User?.FindFirst(ClaimTypes.Name).Value;

            var item   = mapper.Map <TodoItem>(todoItemViewModel);
            var result = await todoListService.AddTodoItem(username, item);

            if (result.Success)
            {
                return(Ok(result.Message));
            }

            return(BadRequest(result.Message));
        }
 public async Task <IActionResult> PostTodoItem([FromBody] TodoItem todoItem)
 {
     return(Ok(await _todoListService.AddTodoItem(todoItem)));
 }