2020-04-28 16:01:39 +02:00
|
|
|
let router = require("express").Router();
|
|
|
|
let isAuth = require("../user").isAuth;
|
|
|
|
let fs = require("fs");
|
|
|
|
|
|
|
|
|
|
|
|
router.get("/", isAuth, (req, res, next) => {
|
|
|
|
let images = fs.readdirSync("./images/");
|
2020-04-29 09:22:33 +02:00
|
|
|
res.render("list", {images: images, session: req.session});
|
2020-04-28 16:01:39 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = router;
|
|
|
|
|