Inits the workflow configuration
This commit is contained in:
parent
f66dac31c9
commit
e6e098b32e
286 changed files with 33660 additions and 64632 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ namespace Yavsc.ApiControllers
|
|||
|
||||
string url = string.Format(
|
||||
"{0}/{1}/{2}",
|
||||
Startup.UserFilesOptions.RequestPath.ToUriComponent(),
|
||||
Config.UserFilesOptions.RequestPath.ToUriComponent(),
|
||||
userName,
|
||||
filename
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue