Add DB constraints to check for user balances

This commit is contained in:
Michael Bumann
2022-01-20 01:57:56 +01:00
parent d4183c100b
commit 70a7e1a8eb
3 changed files with 64 additions and 1 deletions

View File

@@ -79,7 +79,8 @@ func (controller *PayInvoiceController) PayInvoice(c echo.Context) error {
entry, err := controller.svc.PayInvoice(invoice)
if err != nil {
c.Logger().Errorf("Failed: %v", err)
c.Logger().Errorf("Payment failed: %v", err)
// TODO: sentry notification
return c.JSON(http.StatusBadRequest, echo.Map{
"error": true,
"code": 10,