File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -65,9 +65,10 @@ func (subscriptionEndpoint *SubscriptionEndpoint) GetCustomerInvoices(ctx *fiber
65
65
account , _ := userEndpoint .CurrentAccount (ctx )
66
66
sCustomerInvoices , err := subscriptionService .GetCustomerInvoices (account .ID )
67
67
if err != nil {
68
- return ctx .Status (401 ).JSON (fiber.Map {
69
- "message" : err .Error (),
70
- })
68
+ ctx .JSON ([]string {})
69
+ }
70
+ if len (sCustomerInvoices ) == 0 {
71
+ return ctx .JSON ([]string {})
71
72
}
72
73
return ctx .JSON (sCustomerInvoices )
73
74
}
@@ -82,9 +83,10 @@ func (subscriptionEndpoint *SubscriptionEndpoint) GetCustomerCards(ctx *fiber.Ct
82
83
account , _ := userEndpoint .CurrentAccount (ctx )
83
84
sCustomerCards , err := subscriptionService .GetCustomerCards (account .ID )
84
85
if err != nil {
85
- return ctx .Status (401 ).JSON (fiber.Map {
86
- "message" : err .Error (),
87
- })
86
+ ctx .JSON ([]string {})
87
+ }
88
+ if len (sCustomerCards ) == 0 {
89
+ return ctx .JSON ([]string {})
88
90
}
89
91
return ctx .JSON (sCustomerCards )
90
92
}
You can’t perform that action at this time.
0 commit comments