{"size": 636, "ext": "js", "max_stars_repo_path": "src/app/controllers/HomeController.js", "max_stars_repo_name": "Huynhkimphat/UIT_Barber", "max_stars_repo_stars_event_min_datetime": "2021-04-26T03:21:47.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-12T16:24:25.000Z", "max_issues_repo_path": "src/app/controllers/HomeController.js", "max_issues_repo_name": "Huynhkimphat/UIT_Barber", "max_issues_repo_issues_event_min_datetime": "2021-04-08T08:20:44.000Z", "max_issues_repo_issues_event_max_datetime": "2021-06-29T16:42:28.000Z", "max_forks_repo_path": "src/app/controllers/HomeController.js", "max_forks_repo_name": "Huynhkimphat/UIT_Baber", "max_forks_repo_forks_event_min_datetime": "2021-06-29T06:59:39.000Z", "max_forks_repo_forks_event_max_datetime": "2021-06-29T06:59:39.000Z"}
{"max_stars_count": 4, "max_issues_count": 52, "max_forks_count": 1, "avg_line_length": 28.9090909091, "max_line_length": 51, "alphanum_fraction": 0.4072327044}
const { product } = require("../../config/db");

class HomeController {
    show(req, res, next) {
        (async() => {
            let result = await product.show();
            if (process.env.status != 0) {
                res.render("home", {
                    product: result,
                    status: process.env.status,
                    username: process.env.username,
                    img: process.env.img,
                });
            } else {
                res.render("home", {
                    product: result,
                });
            }
        })();
    }
}
module.exports = new HomeController();