mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-07 19:10:12 +08:00
fix: missing express type annotation
This commit is contained in:
1 parent
432084cc66
commit
eb106c020a
6 files changed
+22
-9
No files matched your search
@@ -1,9 +1,11 @@
|
||||
/* eslint-disable object-shorthand */
|
||||
import type { Request, Response } from 'express'
|
||||
import Pagination from '../models/pagination.js'
|
||||
import { errorCommands } from '../models/commands.js'
|
||||
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
export async function commandListController(req: any, res: any): Promise<void> {
|
||||
export async function commandListController(
|
||||
req: Request,
|
||||
res: Response
|
||||
): Promise<void> {
|
||||
const { nextKey, order } = req.query as { nextKey?: string; order: string }
|
||||
const itemsPerPage = 100
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Request, Response } from 'express'
|
||||
import { userCount } from '../models/users.js'
|
||||
import { questList } from '../models/quests.js'
|
||||
import { Request, Response } from 'express'
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
|
||||
export async function homeController(req: Request, res: Response) {
|
||||
const quests = await questList()
|
||||
const [totalQuests, totalCompleted] = quests.reduce(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { questList } from '../models/quests.js'
|
||||
import { Request, Response } from 'express'
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
import { questList } from '../models/quests.js'
|
||||
|
||||
export async function questListController(req: Request, res: Response) {
|
||||
const quests = await questList()
|
||||
quests.forEach((quest) => {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Request, Response } from 'express'
|
||||
import Pagination from '../models/pagination.js'
|
||||
import { sessionList, sessionDetail } from '../models/sessions.js'
|
||||
import { Request, Response } from 'express'
|
||||
|
||||
export async function sessionListController(req: Request, res: Response) {
|
||||
const { nextKey, order } = req.query as { nextKey: string; order: string }
|
||||
const itemsPerPage = 50
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { Request, Response } from 'express'
|
||||
import mongoose from 'mongoose'
|
||||
import Pagination from '../models/pagination.js'
|
||||
import { userList, userDetail, idToUser } from '../models/users.js'
|
||||
import { Request, Response } from 'express'
|
||||
|
||||
export async function userListController(req: Request, res: Response) {
|
||||
const { nextKey, order } = req.query as { nextKey: string; order: string }
|
||||
const itemsPerPage = 50
|
||||
|
||||
Reference in new issue
Block a user