cromos v3

This commit is contained in:
henrydays 2019-04-04 01:51:17 +01:00
parent 569991c7d0
commit ad6b41db7e
1 changed files with 10 additions and 8 deletions

View File

@ -52,20 +52,24 @@ namespace api.Controllers
}
else
{
bool repetido=false;
bool repetido = false;
allCromos.ForEach(delegate (Cromos c)
{
if (c.QRCode == ScanData.ScanQR)
{
toReturn.tipo = 0;
string[] usrCromos = usr.cromos.Substring(1).Split(",");
foreach (string cromo in usrCromos)
{
Console.WriteLine("cromo: "+cromo);
if (ScanData.ScanQR == cromo)
{
repetido = true;
Console.WriteLine("cromo repetido");
}
}
@ -80,14 +84,12 @@ bool repetido=false;
}
});
if(repetido){
return Unauthorized();
}
if (repetido)
{
return Unauthorized();
}
return Ok(toReturn);
}
//return toReturn;
}
}