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.
|
|
const express = require("express") const router = express.Router()
const {generateToken} = require("../graphql") const {fileApi} = require("../../rpdata/api/File")
const filesTemplate = require("../../marko/page/data/files.marko")
router.get("/", async(req, res) => { let privates = [] if (res.locals.user && res.locals.user.loggedIn) { privates = fileApi.list({public: false}, {token: generateToken(res.locals.user.name)}) }
res.markoAsync(filesTemplate, { privates: privates, publics: fileApi.list({public: true}), selected: {files: true}, }) })
module.exports = router
|