api/core/api: clean up imports
This commit is contained in:
parent
c7a08844e3
commit
a21c9e7632
1 changed files with 10 additions and 12 deletions
|
@ -1,23 +1,21 @@
|
||||||
import cors from "cors";
|
import cors from "cors";
|
||||||
import rateLimit from "express-rate-limit";
|
import rateLimit from "express-rate-limit";
|
||||||
import { setGlobalDispatcher, ProxyAgent } from "undici";
|
import { setGlobalDispatcher, ProxyAgent } from "undici";
|
||||||
|
|
||||||
import { getCommit, getBranch, getRemote, getVersion } from "@imput/version-info";
|
import { getCommit, getBranch, getRemote, getVersion } from "@imput/version-info";
|
||||||
|
|
||||||
|
import jwt from "../security/jwt.js";
|
||||||
|
import stream from "../stream/stream.js";
|
||||||
|
import match from "../processing/match.js";
|
||||||
|
|
||||||
import { env } from "../config.js";
|
import { env } from "../config.js";
|
||||||
|
import { extract } from "../processing/url.js";
|
||||||
import { generateHmac, generateSalt } from "../misc/crypto.js";
|
|
||||||
import { Bright, Cyan } from "../misc/console-text.js";
|
|
||||||
import { languageCode } from "../misc/utils.js";
|
import { languageCode } from "../misc/utils.js";
|
||||||
|
import { Bright, Cyan } from "../misc/console-text.js";
|
||||||
import { createResponse, normalizeRequest, getIP } from "../processing/request.js";
|
import { generateHmac, generateSalt } from "../misc/crypto.js";
|
||||||
import { verifyStream, getInternalStream } from "../stream/manage.js";
|
|
||||||
import { randomizeCiphers } from "../misc/randomize-ciphers.js";
|
import { randomizeCiphers } from "../misc/randomize-ciphers.js";
|
||||||
import { verifyTurnstileToken } from "../security/turnstile.js";
|
import { verifyTurnstileToken } from "../security/turnstile.js";
|
||||||
import { extract } from "../processing/url.js";
|
import { verifyStream, getInternalStream } from "../stream/manage.js";
|
||||||
import match from "../processing/match.js";
|
import { createResponse, normalizeRequest, getIP } from "../processing/request.js";
|
||||||
import stream from "../stream/stream.js";
|
|
||||||
import jwt from "../security/jwt.js";
|
|
||||||
|
|
||||||
const git = {
|
const git = {
|
||||||
branch: await getBranch(),
|
branch: await getBranch(),
|
||||||
|
@ -40,7 +38,7 @@ const fail = (res, code) => {
|
||||||
res.status(status).json(body);
|
res.status(status).json(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function runAPI(express, app, __dirname) {
|
export const runAPI = (express, app, __dirname) => {
|
||||||
const startTime = new Date();
|
const startTime = new Date();
|
||||||
const startTimestamp = startTime.getTime();
|
const startTimestamp = startTime.getTime();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue