Skip to content

Commit

Permalink
mocked item
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliohome authored Oct 9, 2023
1 parent aec723d commit ed17917
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/api/ListsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,19 @@ public async Task<ActionResult> CreateList([FromBody]CreateUpdateTodoList list)
}

[HttpGet("{list_id}")]
[Authorize("read:lists")]
[ProducesResponseType(200)]
[ProducesResponseType(404)]
public async Task<ActionResult<IEnumerable<TodoList>>> GetList(Guid list_id)
{
var list = await _repository.GetListAsync(list_id);
TodoItem[] fakeItem = new TodoItem[1] { new TodoItem("Private-Scoped") };

Check failure on line 62 in src/api/ListsController.cs

View workflow job for this annotation

GitHub Actions / build

There is no argument given that corresponds to the required formal parameter 'name' of 'TodoItem.TodoItem(Guid, string)'

Check failure on line 62 in src/api/ListsController.cs

View workflow job for this annotation

GitHub Actions / build

There is no argument given that corresponds to the required formal parameter 'name' of 'TodoItem.TodoItem(Guid, string)'
fakeItem[0].Description = "Auth0 works! ;-)";
await System.Threading.Tasks.Task.Delay(200);
return Ok(fakeItem);

// var list = await _repository.GetListAsync(list_id);

return list == null ? NotFound() : Ok(list);
// return list == null ? NotFound() : Ok(list);
}

[HttpPut("{list_id}")]
Expand Down

0 comments on commit ed17917

Please sign in to comment.