The frontend/UI server, written in JS using the MarkoJS library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

22 lines
559 B

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