mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 03:20:12 +08:00
feat: session detail page
This commit is contained in:
1 parent
a4f1c9fef1
commit
2257b4b809
4 files changed
+70
-3
No files matched your search
@@ -1,7 +1,12 @@
|
||||
import { sessionList } from '../models/sessions.js'
|
||||
import { sessionList, sessionDetail } from '../models/sessions.js'
|
||||
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
export async function sessionListController(req, res) {
|
||||
const sessions = await sessionList()
|
||||
res.render('sessions', { sessions })
|
||||
}
|
||||
|
||||
export async function sessionDetailController(req, res) {
|
||||
const { id } = req.params
|
||||
const session = await sessionDetail(id)
|
||||
res.render('sessionDetail', { session })
|
||||
}
|
||||
Reference in new issue
Block a user