mirror of
https://github.com/spacebarchat/server.git
synced 2026-08-29 05:29:15 +00:00
Move database to toplevel
This commit is contained in:
+5
-4
@@ -21,13 +21,14 @@ import { Request, Response, Router } from "express";
|
||||
import morgan from "morgan";
|
||||
import { Server, ServerOptions } from "lambert-server/Server";
|
||||
import { red } from "picocolors";
|
||||
import { Config, ConnectionConfig, ConnectionLoader, Email, JSONReplacer, WebAuthn, initDatabase, initEvent, registerRoutes, getDatabase, getRevInfoOrFail } from "@spacebar/util";
|
||||
import { Authentication, CORS, ImageProxy, BodyParser, ErrorHandler, initRateLimits, initTranslation } from "./middlewares";
|
||||
import { initInstance } from "./util/handlers/Instance";
|
||||
import { route } from "./util";
|
||||
import { getDatabase, initDatabase } from "@spacebar/database";
|
||||
import { Config, ConnectionConfig, ConnectionLoader, Email, JSONReplacer, WebAuthn, initEvent, registerRoutes, getRevInfoOrFail } from "@spacebar/util";
|
||||
import { ProcessLifecycle } from "../util/util/ProcessLifecycle";
|
||||
import { Monitoring } from "../util/monitoring/Monitoring";
|
||||
import { BcryptWorkerPool } from "../util/util/workers/bcrypt/BcryptWorkerPool";
|
||||
import { Authentication, CORS, ImageProxy, BodyParser, ErrorHandler, initRateLimits, initTranslation } from "./middlewares";
|
||||
import { initInstance } from "./util/handlers/Instance";
|
||||
import { route } from "./util";
|
||||
|
||||
const ASSETS_FOLDER = path.join(__dirname, "..", "..", "assets");
|
||||
const PUBLIC_ASSETS_FOLDER = path.join(ASSETS_FOLDER, "public");
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
import { Router, Response, Request } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { getDatabase } from "@spacebar/util";
|
||||
import { getDatabase } from "@spacebar/database";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
import { Router, Response, Request } from "express";
|
||||
import { route } from "@spacebar/api";
|
||||
import { getDatabase } from "@spacebar/util";
|
||||
import { getDatabase } from "@spacebar/database";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -16,7 +16,10 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { Equal, In, Or } from "typeorm";
|
||||
import { fillMessageUrlEmbeds, randomString } from "@spacebar/api";
|
||||
import { getDatabase } from "@spacebar/database";
|
||||
import { mathLogBase, arrayDistributeSequentially } from "@spacebar/extensions";
|
||||
import {
|
||||
Application,
|
||||
@@ -28,7 +31,6 @@ import {
|
||||
emitEvent,
|
||||
EVERYONE_MENTION,
|
||||
FieldErrors,
|
||||
getDatabase,
|
||||
getPermission,
|
||||
getRights,
|
||||
Guild,
|
||||
@@ -53,8 +55,6 @@ import {
|
||||
USER_MENTION,
|
||||
Webhook,
|
||||
} from "@spacebar/util";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { Equal, In, Or } from "typeorm";
|
||||
import {
|
||||
ActionRowComponent,
|
||||
BaseMessageComponents,
|
||||
|
||||
Reference in New Issue
Block a user