From a21c9e7632f9cb985abbcc5c080e5c5668bde3cc Mon Sep 17 00:00:00 2001 From: wukko Date: Thu, 22 Aug 2024 23:04:11 +0600 Subject: [PATCH] api/core/api: clean up imports --- api/src/core/api.js | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/api/src/core/api.js b/api/src/core/api.js index fb55d35a..40024156 100644 --- a/api/src/core/api.js +++ b/api/src/core/api.js @@ -1,23 +1,21 @@ import cors from "cors"; import rateLimit from "express-rate-limit"; import { setGlobalDispatcher, ProxyAgent } from "undici"; - 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 { generateHmac, generateSalt } from "../misc/crypto.js"; -import { Bright, Cyan } from "../misc/console-text.js"; +import { extract } from "../processing/url.js"; import { languageCode } from "../misc/utils.js"; - -import { createResponse, normalizeRequest, getIP } from "../processing/request.js"; -import { verifyStream, getInternalStream } from "../stream/manage.js"; +import { Bright, Cyan } from "../misc/console-text.js"; +import { generateHmac, generateSalt } from "../misc/crypto.js"; import { randomizeCiphers } from "../misc/randomize-ciphers.js"; import { verifyTurnstileToken } from "../security/turnstile.js"; -import { extract } from "../processing/url.js"; -import match from "../processing/match.js"; -import stream from "../stream/stream.js"; -import jwt from "../security/jwt.js"; +import { verifyStream, getInternalStream } from "../stream/manage.js"; +import { createResponse, normalizeRequest, getIP } from "../processing/request.js"; const git = { branch: await getBranch(), @@ -40,7 +38,7 @@ const fail = (res, code) => { res.status(status).json(body); } -export function runAPI(express, app, __dirname) { +export const runAPI = (express, app, __dirname) => { const startTime = new Date(); const startTimestamp = startTime.getTime();