2021-12-29 23:08:41 +00:00
|
|
|
import exprs from 'express';
|
|
|
|
const { Router } = exprs;
|
|
|
|
import { isAuthenticated } from '../../utils/authCheck.js';
|
2022-05-01 17:35:20 +00:00
|
|
|
import { listOfferBookmarks, deleteOfferBookmark, listOffers, disableOffer, createOffer, fetchOfferInvoice } from '../../controllers/cln/offers.js';
|
2021-12-29 23:08:41 +00:00
|
|
|
const router = Router();
|
|
|
|
router.get('/offerbookmarks', isAuthenticated, listOfferBookmarks);
|
|
|
|
router.delete('/offerbookmark/:offerStr', isAuthenticated, deleteOfferBookmark);
|
|
|
|
router.get('/', isAuthenticated, listOffers);
|
|
|
|
router.post('/', isAuthenticated, createOffer);
|
|
|
|
router.post('/fetchOfferInvoice', isAuthenticated, fetchOfferInvoice);
|
|
|
|
router.delete('/:offerID', isAuthenticated, disableOffer);
|
|
|
|
export default router;
|