2021-12-30 00:08:41 +01:00
|
|
|
import exprs from 'express';
|
|
|
|
const { Router } = exprs;
|
|
|
|
import { isAuthenticated } from '../../utils/authCheck.js';
|
2023-10-03 05:55:16 +02:00
|
|
|
import { loopInfo, loopInTerms, loopInQuote, loopInTermsAndQuotes, loopIn, loopOutTerms, loopOutQuote, loopOutTermsAndQuotes, loopOut, swaps, swap } from '../../controllers/shared/loop.js';
|
2021-12-30 00:08:41 +01:00
|
|
|
const router = Router();
|
2023-10-03 05:55:16 +02:00
|
|
|
router.get('/info', isAuthenticated, loopInfo);
|
2021-12-30 00:08:41 +01:00
|
|
|
router.get('/in/terms', isAuthenticated, loopInTerms);
|
|
|
|
router.get('/in/quote/:amount', isAuthenticated, loopInQuote);
|
|
|
|
router.get('/in/termsAndQuotes', isAuthenticated, loopInTermsAndQuotes);
|
|
|
|
router.post('/in', isAuthenticated, loopIn);
|
|
|
|
router.get('/out/terms', isAuthenticated, loopOutTerms);
|
|
|
|
router.get('/out/quote/:amount', isAuthenticated, loopOutQuote);
|
|
|
|
router.get('/out/termsAndQuotes', isAuthenticated, loopOutTermsAndQuotes);
|
|
|
|
router.post('/out', isAuthenticated, loopOut);
|
|
|
|
router.get('/swaps', isAuthenticated, swaps);
|
|
|
|
router.get('/swap/:id', isAuthenticated, swap);
|
|
|
|
export default router;
|