const express = require('express');
const router = express.Router();
const { all } = require('../utils/db');
const { success } = require('../utils/response');

router.get('/list', (req, res) => {
  const list = all('SELECT * FROM banners WHERE status=1 ORDER BY sort ASC');
  return res.json(success(list));
});

module.exports = router;
