Skip to content

Commit f1d9a01

Browse files
committed
Update Program.cs
1 parent b1e7e62 commit f1d9a01

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/WebApi/Program.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,11 @@
109109

110110
app.MapHealthChecks("/healthz");
111111

112+
#if !EXTRAOPTIMIZE
112113
app.MapGet("/clientes/{id:int}/extrato", async (int id, [FromServices] ILogger<Program> logger, [FromServices] NpgsqlDataSource dataSource) =>
114+
#else
115+
app.MapGet("/clientes/{id:int}/extrato", async (int id, [FromServices] NpgsqlDataSource dataSource) =>
116+
#endif
113117
{
114118
if (!clientes.TryGetValue(id, out _))
115119
return Results.NotFound();
@@ -142,7 +146,11 @@
142146
}
143147
});
144148

149+
#if !EXTRAOPTIMIZE
145150
app.MapPost("/clientes/{id:int}/transacoes", async (int id, [FromBody] TransacaoDto transacao, [FromServices] ILogger<Program> logger, [FromServices] NpgsqlDataSource dataSource) =>
151+
#else
152+
app.MapPost("/clientes/{id:int}/transacoes", async (int id, [FromBody] TransacaoDto transacao, [FromServices] NpgsqlDataSource dataSource) =>
153+
#endif
146154
{
147155
if (!clientes.TryGetValue(id, out int limite))
148156
return Results.NotFound();

0 commit comments

Comments
 (0)