mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 03:20:12 +08:00
feat: user sessions history & fix ts <any>
This commit is contained in:
1 parent
94ae2d7df4
commit
218a25daee
7 files changed
+95
-43
No files matched your search
@@ -1,8 +1,8 @@
|
||||
import Pagination from '../models/pagination.ts'
|
||||
import { sessionList, sessionDetail } from '../models/sessions.ts'
|
||||
import { Request, Response } from 'express'
|
||||
export async function sessionListController(req: any, res: any) {
|
||||
const { nextKey, order } = req.query
|
||||
export async function sessionListController(req: Request, res: Response) {
|
||||
const { nextKey, order } = req.query as { nextKey: string; order: string }
|
||||
const itemsPerPage = 50
|
||||
|
||||
try {
|
||||
@@ -21,7 +21,7 @@ export async function sessionListController(req: any, res: any) {
|
||||
}
|
||||
}
|
||||
|
||||
export async function sessionDetailController(req: any, res: any) {
|
||||
export async function sessionDetailController(req: Request, res: Response) {
|
||||
const { id } = req.params
|
||||
const session = await sessionDetail(id)
|
||||
res.render('sessionDetail', { session })
|
||||
|
||||
Reference in new issue
Block a user