Save exchange rate with invoice

- Fix issue where completed invoices were flagged as expired
This commit is contained in:
2021-01-02 22:14:59 +01:00
parent b356f3ee70
commit fc71aed660
8 changed files with 55 additions and 44 deletions

View File

@@ -1,13 +1,18 @@
import { Router } from "express";
import { createInvoice, getConfirmation, getInvoice, getPaymentMethods, setPaymentMethod } from "../controllers/invoice";
import { cancelInvoice, createInvoice, getConfirmation, getInvoice, getPaymentMethods, setPaymentMethod } from "../controllers/invoice";
import { MW_User } from "../controllers/user";
const invoiceRouter = Router()
// Get general information
invoiceRouter.get('/paymentmethods', getPaymentMethods);
// Actions related to specific invoices
invoiceRouter.get('/:selector', getInvoice);
invoiceRouter.delete('/:selector', cancelInvoice);
invoiceRouter.get('/:selector/confirmation', getConfirmation);
invoiceRouter.post('/:selector/setmethod', setPaymentMethod);
invoiceRouter.get('/', MW_User, getInvoice);
invoiceRouter.post('/', MW_User, createInvoice);