Skip to content

Commit

Permalink
Update routes
Browse files Browse the repository at this point in the history
  • Loading branch information
atrakic committed Oct 25, 2024
1 parent 39d92ef commit ade4964
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/EchoApi/EchoApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.10" />
<PackageReference Include="Microsoft.AspNetCore.RateLimiting" Version="7.0.0-rc.2.22476.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.10" />
<PackageReference Include="NSwag.AspNetCore" Version="14.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.9.0" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/EchoApi/EndpointMappings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ public static void MapEchoApiV1(this IEndpointRouteBuilder group)
}
});

group.MapGet("/api/messages", GetAllMessages).RequireAuthorization().WithOpenApi();
group.MapGet("/api/message/{id:int}", GetMessageById).RequireAuthorization().WithOpenApi();
group.MapGet("/", GetAllMessages).RequireAuthorization().WithOpenApi();
group.MapPost("/", CreateMessage).RequireAuthorization().WithOpenApi();
group.MapGet("/api/message/{id:int}", GetMessageById).RequireAuthorization().WithOpenApi();
group.MapPut("/api/message/{id}", UpdateMessage).RequireAuthorization().WithOpenApi();
group.MapDelete("/api/message/{id}", DeleteMessage).RequireAuthorization().WithOpenApi();
}
Expand Down

0 comments on commit ade4964

Please sign in to comment.