mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
11 lines
321 B
TypeScript
11 lines
321 B
TypeScript
import { Request, Response } from 'express'
|
|
import { questList } from '../models/quests'
|
|
|
|
export async function questListController(req: Request, res: Response) {
|
|
const quests = await questList()
|
|
quests.forEach((quest) => {
|
|
quest.failed = quest.started - quest.completed
|
|
})
|
|
res.render('quests', { quests })
|
|
}
|