Proper handling of unequal payments

- Cryptocurrencies are enabled dynamically
- Invoice handler handles now more
- Better status change handling
This commit is contained in:
2021-01-01 19:39:38 +01:00
parent aa2147d509
commit b356f3ee70
12 changed files with 305 additions and 120 deletions

View File

@@ -1,11 +1,12 @@
import { Router } from "express";
import { createInvoice, getInvoice, getPaymentMethods, setPaymentMethod } from "../controllers/invoice";
import { createInvoice, getConfirmation, getInvoice, getPaymentMethods, setPaymentMethod } from "../controllers/invoice";
import { MW_User } from "../controllers/user";
const invoiceRouter = Router()
invoiceRouter.get('/paymentmethods', getPaymentMethods);
invoiceRouter.get('/:selector', getInvoice);
invoiceRouter.get('/:selector/confirmation', getConfirmation);
invoiceRouter.post('/:selector/setmethod', setPaymentMethod);
invoiceRouter.get('/', MW_User, getInvoice);
invoiceRouter.post('/', MW_User, createInvoice);