mirror of
https://github.com/Queercon/QC14-Badge-Webview.git
synced 2025-08-14 02:27:10 -07:00
sql update working
This commit is contained in:
parent
dea8abf8f2
commit
6afa3aaeb4
2 changed files with 34 additions and 8 deletions
|
@ -150,8 +150,9 @@ namespace qcbadge.Controllers
|
|||
}
|
||||
else
|
||||
{
|
||||
Helpers.Sql sql = new Helpers.Sql();
|
||||
|
||||
if(!String.IsNullOrEmpty(advertData64))
|
||||
if (!String.IsNullOrEmpty(advertData64))
|
||||
{
|
||||
byte[] bytes = Convert.FromBase64String(advertData64);
|
||||
advertData = "0x" + BitConverter.ToString(bytes);
|
||||
|
@ -209,7 +210,21 @@ namespace qcbadge.Controllers
|
|||
System.Diagnostics.Debug.WriteLine(bitSet[i]);
|
||||
}
|
||||
|
||||
return StatusCode(200);
|
||||
|
||||
|
||||
int rows = sql.updateBadge(badgeId, curIcon, bitSet);
|
||||
System.Diagnostics.Debug.WriteLine(rows);
|
||||
|
||||
if(rows == 1)
|
||||
{
|
||||
return StatusCode(201);
|
||||
}
|
||||
else
|
||||
{
|
||||
return StatusCode(200);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue