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.
20 lines
449 B
20 lines
449 B
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("/", common, (req, res) => {
|
|
try {
|
|
res.markoAsync(listTemplate, {
|
|
stories: storyApi.list(),
|
|
selected: {index: true},
|
|
})
|
|
} catch(err) {
|
|
console.error(err)
|
|
}
|
|
})
|
|
|
|
module.exports = router
|