refacto query status

This commit is contained in:
Paul Schneider 2026-07-04 22:35:53 +01:00
commit 7b3a236bcc
11 changed files with 20 additions and 53 deletions

View file

@ -34,8 +34,8 @@ namespace Yavsc.ApiControllers
if (queryId == 0) return BadRequest("queryId");
var billing = BillingService.GetBillable(dbContext, billingCode, queryId);
if (billing == null) return BadRequest();
billing.Reviewed = true;
billing.Accepted = false;
billing.Status = QueryStatus.Rejected;
dbContext.SaveChanges();
return Ok();
}
@ -47,8 +47,7 @@ namespace Yavsc.ApiControllers
if (queryId == 0) return BadRequest("queryId");
var billing = BillingService.GetBillable(dbContext, billingCode, queryId);
if (billing == null) return BadRequest();
billing.Accepted = true;
billing.Reviewed = true;
billing.Status = QueryStatus.Accepted;
dbContext.SaveChanges();
return Ok();
}