Merge remote-tracking branch 'btcpayserver/master' into feature/extended-invoice

This commit is contained in:
Andrew Camilleri 2018-05-11 10:08:29 +02:00
commit dbe5c62d11
3 changed files with 6 additions and 4 deletions

View file

@ -45,7 +45,7 @@ namespace BTCPayServer.Controllers
[Route("invoices/{id}")]
public async Task<DataWrapper<InvoiceResponse>> GetInvoice(string id, string token)
{
var invoice = await _InvoiceRepository.GetInvoice(HttpContext.GetStoreData().Id, id);
var invoice = await _InvoiceRepository.GetInvoice(null, id);
if (invoice == null)
throw new BitpayHttpException(404, "Object not found");
var resp = invoice.EntityToDTO(_NetworkProvider);

View file

@ -41,8 +41,10 @@ namespace BTCPayServer.Data
public void ConfigureHangfireBuilder(IGlobalConfiguration builder)
{
builder.UseMemoryStorage();
//We always use memory storage because of incompatibilities with the latest postgres in 2.1
//if (_Type == DatabaseType.Sqlite)
builder.UseMemoryStorage(); //Sql provider does not support multiple workers
// builder.UseMemoryStorage(); //Sqlite provider does not support multiple workers
//else if (_Type == DatabaseType.Postgres)
// builder.UsePostgreSqlStorage(_ConnectionString);
}

View file

@ -94,9 +94,9 @@ namespace BTCPayServer.Hosting
return true;
if (
bitpayAuth &&
path.StartsWith("/invoices/", StringComparison.OrdinalIgnoreCase) &&
httpContext.Request.Method == "GET")
httpContext.Request.Method == "GET" &&
(httpContext.Request.ContentType ?? string.Empty).StartsWith("application/json", StringComparison.OrdinalIgnoreCase))
return true;
if (path.Equals("/rates", StringComparison.OrdinalIgnoreCase) &&