const express = require("express");

const { sequelize } = require("../models");

const router = express.Router();
router.get("/brands", async (request, response, next) => {
  try {
   const brands = await sequelize.models.Brand.findAll();
    response.status(200).json(brands);
  } catch (error) {
    next(error);
  }
});

router.get("/features", async (request, response, next) => {
  try {
   const brands = await sequelize.models.Feature.findAll();
    response.status(200).json(brands);
  } catch (error) {
    next(error);
  }
});

module.exports = router;