mirror of
https://github.com/getAlby/lndhub.go.git
synced 2025-12-23 23:55:02 +01:00
Merge pull request #67 from getAlby/do-not-return-initialized-invoices
Do not return invoices that are in the initialized state
This commit is contained in:
@@ -74,7 +74,7 @@ func (svc *LndhubService) InvoicesFor(ctx context.Context, userId int64, invoice
|
||||
|
||||
query := svc.DB.NewSelect().Model(&invoices).Where("user_id = ?", userId)
|
||||
if invoiceType != "" {
|
||||
query.Where("type = ?", invoiceType)
|
||||
query.Where("type = ? AND state <> ?", invoiceType, "initialized")
|
||||
}
|
||||
query.OrderExpr("id DESC").Limit(100)
|
||||
err := query.Scan(ctx)
|
||||
|
||||
Reference in New Issue
Block a user