const express = require('express');
const router = express.Router();
 
router.get('/', (req, res) => {
    const ua = req.headers['user-agent'] || '';
 
    if (/android/i.test(ua)) {
        res.redirect('https://play.google.com/store/apps/details?id=app.bobrosone.android');
    } else if (/iPhone|iPad|iPod/i.test(ua)) {
        res.redirect('https://apps.apple.com/in/app/bobros/id6504723845');
    } else {
        res.redirect('https://bobrosone.com/');
    }
});
 
module.exports = router;