From fe693cf097fd87136f3e434d726a8b07998753dd Mon Sep 17 00:00:00 2001 From: Karl-Knapp <116918866+Karl-Knapp@users.noreply.github.com> Date: Fri, 9 Aug 2024 10:07:48 -0500 Subject: [PATCH] Update Program.cs, error fixing Removed the $ from app.MapPost as it caused an error and did not align with the Dependency Injection video's code. --- Backend Web with Web APIs/sample-code/MyNewApp/Program.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Backend Web with Web APIs/sample-code/MyNewApp/Program.cs b/Backend Web with Web APIs/sample-code/MyNewApp/Program.cs index 3c462f8..11c44ae 100644 --- a/Backend Web with Web APIs/sample-code/MyNewApp/Program.cs +++ b/Backend Web with Web APIs/sample-code/MyNewApp/Program.cs @@ -26,7 +26,7 @@ app.MapPost("/todos", (Todo task, ITaskService service) => { service.AddTodo(task); - return TypedResults.Created($"/todos/{id}", task); + return TypedResults.Created("/todos/{id}", task); }) .AddEndpointFilter(async (context, next) => { var taskArgument = context.GetArgument(0); @@ -89,4 +89,4 @@ public List GetTodos() { return _todos; } -} \ No newline at end of file +}