Last active
January 14, 2022 21:44
-
-
Save cheoalfredo/6a1f7d94b82c32201de752068593f82d to your computer and use it in GitHub Desktop.
Controlador de prueba con autorizacion habilitada
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.MapGet("/api/numero", [Authorize]() => { | |
var rng = new Random(); | |
int[] Numeros = Enumerable.Range(0, 100).ToArray<int>(); | |
return Enumerable.Range(1, 5).Select(index => | |
{ | |
var pos = rng.Next(1, Numeros.Length); | |
return Numeros[pos]; | |
}).ToArray(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment