const express = require("express");
const router = express.Router();
const validateFirebaseIdTokenMiddleware = require("../middleware/validateFirebaseIdTokenMiddleware");
const { payments, payables, receivables } = require("../accounting/qbxml/qbxml");
const withUserGraphQLClientMiddleware = require("../middleware/withUserGraphQLClientMiddleware");

router.use(validateFirebaseIdTokenMiddleware);

router.post("/qbxml/receivables", withUserGraphQLClientMiddleware, receivables);
router.post("/qbxml/payables", withUserGraphQLClientMiddleware, payables);
router.post("/qbxml/payments", withUserGraphQLClientMiddleware, payments);

module.exports = router;
