Inits the workflow configuration

This commit is contained in:
Paul Schneider 2024-02-25 18:05:10 +00:00
commit e6e098b32e
286 changed files with 33660 additions and 64632 deletions

View file

@ -130,7 +130,7 @@ namespace Yavsc.ApiControllers
u => u.Id == uid
);
try {
if (Startup.UserFilesOptions.FileProvider.GetFileInfo(Path.Combine(user.UserName, query.id)).Exists)
if (Config.UserFilesOptions.FileProvider.GetFileInfo(Path.Combine(user.UserName, query.id)).Exists)
{
var result = user.MoveUserFile(query.id, query.to);
if (!result.Done) return new BadRequestObjectResult(result);

View file

@ -49,7 +49,7 @@ namespace Yavsc.ApiControllers
string url = string.Format(
"{0}/{1}/{2}",
Startup.UserFilesOptions.RequestPath.ToUriComponent(),
Config.UserFilesOptions.RequestPath.ToUriComponent(),
userName,
filename
);

View file

@ -32,7 +32,7 @@ namespace Yavsc.ApiControllers
public BillingController(
IAuthorizationService authorizationService,
ILoggerFactory loggerFactory,
IStringLocalizer<Yavsc.YavscLocalisation> SR,
IStringLocalizer<Yavsc.YavscLocalization> SR,
ApplicationDbContext context,
IOptions<GoogleAuthSettings> googleSettings,
IYavscMessageSender GCMSender,

View file

@ -34,10 +34,23 @@ namespace Yavsc.ApiControllers
if (queryId == 0) return BadRequest("queryId");
var billing = BillingService.GetBillable(dbContext, billingCode, queryId);
if (billing == null) return BadRequest();
billing.Rejected = true;
billing.RejectedAt = DateTime.Now;
billing.Decided = true;
billing.Accepted = false;
dbContext.SaveChanges();
return Ok();
}
[HttpPost("query/reject")]
public IActionResult AcceptQuery(string billingCode, long queryId)
{
if (billingCode == null) return BadRequest("billingCode");
if (queryId == 0) return BadRequest("queryId");
var billing = BillingService.GetBillable(dbContext, billingCode, queryId);
if (billing == null) return BadRequest();
billing.Accepted = true;
billing.Decided = true;
dbContext.SaveChanges();
return Ok();
}
}
}

View file

@ -166,7 +166,7 @@ namespace Yavsc.ApiControllers
if (payment==null) {
_logger.LogError("Error doing SetExpressCheckout, aborting.");
_logger.LogError(JsonConvert.SerializeObject(Startup.PayPalSettings));
_logger.LogError(JsonConvert.SerializeObject(Config.PayPalSettings));
return new StatusCodeResult(500);
}
switch (payment.Ack)