Merge pull request #3007 from bolatovumar/fix/typo-inlude

Fix typos
This commit is contained in:
Nicolas Dorier 2021-10-25 18:46:23 +09:00 committed by GitHub
commit 05f99f3855
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -536,11 +536,11 @@ namespace BTCPayServer.Services.Invoices
return true; return true;
} }
public async Task<InvoiceEntity> GetInvoice(string id, bool inludeAddressData = false) public async Task<InvoiceEntity> GetInvoice(string id, bool includeAddressData = false)
{ {
using (var context = _applicationDbContextFactory.CreateContext()) using (var context = _applicationDbContextFactory.CreateContext())
{ {
var res = await GetInvoiceRaw(id, context, inludeAddressData); var res = await GetInvoiceRaw(id, context, includeAddressData);
return res == null ? null : ToEntity(res); return res == null ? null : ToEntity(res);
} }
} }
@ -559,13 +559,13 @@ namespace BTCPayServer.Services.Invoices
} }
} }
private async Task<InvoiceData> GetInvoiceRaw(string id, ApplicationDbContext dbContext, bool inludeAddressData = false) private async Task<InvoiceData> GetInvoiceRaw(string id, ApplicationDbContext dbContext, bool includeAddressData = false)
{ {
IQueryable<Data.InvoiceData> query = IQueryable<Data.InvoiceData> query =
dbContext dbContext
.Invoices .Invoices
.Include(o => o.Payments); .Include(o => o.Payments);
if (inludeAddressData) if (includeAddressData)
query = query.Include(o => o.HistoricalAddressInvoices).Include(o => o.AddressInvoices); query = query.Include(o => o.HistoricalAddressInvoices).Include(o => o.AddressInvoices);
query = query.Where(i => i.Id == id); query = query.Where(i => i.Id == id);