summary refs log tree commit diff
path: root/api/src/middlewares
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2022-07-19 07:21:26 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-09 23:28:27 +0200
commit279ec10081f245f4d5bbca8b63485c841f619e35 (patch)
tree4e58b7bb26fa3f5f60cfc8888b9f37a258146083 /api/src/middlewares
parentupdate node types to v18, ditch node-fetch (diff)
downloadserver-279ec10081f245f4d5bbca8b63485c841f619e35.tar.xz
State update, havent tested
Diffstat (limited to 'api/src/middlewares')
-rw-r--r--api/src/middlewares/Authentication.ts2
-rw-r--r--api/src/middlewares/BodyParser.ts2
-rw-r--r--api/src/middlewares/ErrorHandler.ts2
-rw-r--r--api/src/middlewares/TestClient.ts3
4 files changed, 4 insertions, 5 deletions
diff --git a/api/src/middlewares/Authentication.ts b/api/src/middlewares/Authentication.ts

index 1df7911b..2d9ccf57 100644 --- a/api/src/middlewares/Authentication.ts +++ b/api/src/middlewares/Authentication.ts
@@ -1,5 +1,5 @@ import { NextFunction, Request, Response } from "express"; -import { HTTPError } from "lambert-server"; +import { HTTPError } from "@fosscord/util"; import { checkToken, Config, Rights } from "@fosscord/util"; export const NO_AUTHORIZATION_ROUTES = [ diff --git a/api/src/middlewares/BodyParser.ts b/api/src/middlewares/BodyParser.ts
index 4cb376bc..35db3c6f 100644 --- a/api/src/middlewares/BodyParser.ts +++ b/api/src/middlewares/BodyParser.ts
@@ -1,6 +1,6 @@ import bodyParser, { OptionsJson } from "body-parser"; import { NextFunction, Request, Response } from "express"; -import { HTTPError } from "lambert-server"; +import { HTTPError } from "@fosscord/util"; export function BodyParser(opts?: OptionsJson) { const jsonParser = bodyParser.json(opts); diff --git a/api/src/middlewares/ErrorHandler.ts b/api/src/middlewares/ErrorHandler.ts
index 2012b91c..8a046e06 100644 --- a/api/src/middlewares/ErrorHandler.ts +++ b/api/src/middlewares/ErrorHandler.ts
@@ -1,5 +1,5 @@ import { NextFunction, Request, Response } from "express"; -import { HTTPError } from "lambert-server"; +import { HTTPError } from "@fosscord/util"; import { ApiError, FieldError } from "@fosscord/util"; const EntityNotFoundErrorRegex = /"(\w+)"/; diff --git a/api/src/middlewares/TestClient.ts b/api/src/middlewares/TestClient.ts
index 466d4bcc..167b4c47 100644 --- a/api/src/middlewares/TestClient.ts +++ b/api/src/middlewares/TestClient.ts
@@ -1,11 +1,10 @@ import express, { Request, Response, Application } from "express"; -import fs, { writeFile } from "fs"; +import fs from "fs"; import path from "path"; import fetch, { Response as FetchResponse, Headers } from "node-fetch"; import ProxyAgent from 'proxy-agent'; import { Config } from "@fosscord/util"; import { AssetCacheItem } from "../util/entities/AssetCacheItem" -import { FileLogger } from "typeorm"; export default function TestClient(app: Application) { const agent = new ProxyAgent();