const express = require("express") const router = express.Router() const common = require("./common") const {storyApi} = require("../../rpdata/api/Story") const listTemplate = require("../../marko/page/story/list.marko") router.get("/:author", common, async(req, res) => { res.locals.menuAuthor = req.params.author try { res.markoAsync(listTemplate, { stories: storyApi.list({author: req.params.author}), menuAuthor: req.params.author, selected: {special: "author"}, }) } catch(err) { console.error(err) } }) module.exports = router