All files / src/routes index.ts

0% Statements 0/21
100% Branches 0/0
0% Functions 0/1
0% Lines 0/21

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43                                                                                     
import { Router } from 'express';
import { healthRoutes } from './health.routes';
import { smsRoutes } from './sms.routes';
import { idnotRoutes } from './idnot.routes';
import { emailRoutes } from './email.routes';
import { stripeRoutes } from './stripe.routes';
import { subscriptionRoutes } from './subscription.routes';
import { processRoutes } from './process.routes';
import fundsRoutes from './funds.routes';
 
const router = Router();
 
// Root endpoint
router.get('/', (req, res) => {
  res.json({
    message: 'LeCoffre Backend API',
    version: '1.0.0',
    status: 'running',
    endpoints: {
      health: '/api/v1/health',
      funds: '/api/v1/funds',
      sms: '/api/sms',
      idnot: '/api/v1/idnot',
      process: '/api/v1/process',
      email: '/api/email',
      stripe: '/api/stripe',
      subscription: '/api/subscription'
    }
  });
});
 
// Mount routes
router.use('/api/v1', healthRoutes);
router.use('/api/v1/funds', fundsRoutes);
router.use('/api', smsRoutes);
router.use('/api/v1/idnot', idnotRoutes);
router.use('/api/v1/process', processRoutes);
router.use('/api', emailRoutes);
router.use('/api', stripeRoutes);
router.use('/api', subscriptionRoutes);
 
export { router as routes };