You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RTL/server/routes/shared/loop.ts

21 lines
978 B
TypeScript

import exprs from 'express';
const { Router } = exprs;
import { isAuthenticated } from '../../utils/authCheck.js';
import { loopInfo, loopInTerms, loopInQuote, loopInTermsAndQuotes, loopIn, loopOutTerms, loopOutQuote, loopOutTermsAndQuotes, loopOut, swaps, swap } from '../../controllers/shared/loop.js';
const router = Router();
router.get('/info', isAuthenticated, loopInfo);
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;