2
0
mirror of https://github.com/Ride-The-Lightning/RTL synced 2024-11-17 15:29:30 +00:00
RTL/server/routes/shared/loop.ts

20 lines
920 B
TypeScript
Raw Normal View History

2021-12-29 23:08:41 +00:00
import exprs from 'express';
const { Router } = exprs;
import { isAuthenticated } from '../../utils/authCheck.js';
import { loopInTerms, loopInQuote, loopInTermsAndQuotes, loopIn, loopOutTerms, loopOutQuote, loopOutTermsAndQuotes, loopOut, swaps, swap } from '../../controllers/shared/loop.js';
const router = Router();
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;