const express = require('express');
const router = express.Router();
const otpController = require('../controllers/otpController');
const { authenticate } = require('../middleware/auth');
const { tradingLimiter } = require('../middleware/rateLimiter');
const { validate, body, query, param } = require('../middleware/validation');

router.post(
    "/request",
    authenticate,
    [
      body("type").isIn(['email_verification','phone_verification','2fa','deposit','password_reset','withdrawal','login','transaction','api_key','security_change']).withMessage("Invalid request Type"),
    ],
    validate,
    otpController.generateOTP
)

module.exports = router;