some beta stuff
This commit is contained in:
parent
2c480909ee
commit
4eddd1a0c7
7 changed files with 82 additions and 9 deletions
15
routes/user.js
Normal file
15
routes/user.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { Router } from "express";
|
||||
const router = Router();
|
||||
|
||||
//todo: fix jank
|
||||
|
||||
router.get('/:username', (req, res, next) => {
|
||||
res.ctx.mainPage = 'user'
|
||||
res.ctx.mainCtx = {
|
||||
username: req.params.username,
|
||||
isYou: res.auth && req.params.username == res.auth.username
|
||||
}
|
||||
next();
|
||||
})
|
||||
|
||||
export default router;
|
Loading…
Add table
Add a link
Reference in a new issue