Replace deprecated koa middleware
This commit is contained in:
1 parent
8ddb692370
commit
4be39ed742
4 files changed
+142
-176
No files matched your search
@@ -1,10 +1,10 @@
|
||||
import { constants } from "node:zlib";
|
||||
import Koa from "koa";
|
||||
import Router from "koa-router";
|
||||
import Router from "@koa/router";
|
||||
import * as jwt from "jsonwebtoken";
|
||||
import koaSend from "koa-send";
|
||||
import koaCompress from "koa-compress";
|
||||
import koaBodyParser from "koa-bodyparser";
|
||||
import koaBodyParser from "@koa/bodyparser";
|
||||
import koaJwt from "koa-jwt";
|
||||
import * as config from "./config.ts";
|
||||
import api from "./ui/api.ts";
|
||||
@@ -18,12 +18,6 @@ import { version as VERSION } from "../package.json";
|
||||
import memoize from "./common/memoize.ts";
|
||||
import { APP_JS, APP_CSS, FAVICON_PNG } from "../build/assets.ts";
|
||||
|
||||
declare module "koa" {
|
||||
interface Request {
|
||||
body: any;
|
||||
}
|
||||
}
|
||||
|
||||
const koa = new Koa();
|
||||
const router = new Router();
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { Readable } from "node:stream";
|
||||
import Router from "koa-router";
|
||||
import Router from "@koa/router";
|
||||
import { ObjectId } from "mongodb";
|
||||
import * as db from "./db.ts";
|
||||
import * as apiFunctions from "../api-functions.ts";
|
||||
|
||||
Reference in new issue
Block a user