1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-10 04:32:35 +01:00

update imports for fosscord-server-util

This commit is contained in:
Flam3rboy 2021-02-10 14:16:30 +01:00
parent d8a5084255
commit a283d70b83
7 changed files with 7 additions and 6 deletions

View File

@ -3,7 +3,7 @@ import fs from "fs/promises";
import { Server, ServerOptions } from "lambert-server";
import { Authentication, GlobalRateLimit } from "./middlewares/";
import Config from "./util/Config";
import { db } from "discord-server-util";
import { db } from "fosscord-server-util";
import i18next from "i18next";
import i18nextMiddleware, { I18next } from "i18next-http-middleware";
import i18nextBackend from "i18next-node-fs-backend";

View File

@ -1,6 +1,6 @@
import { NextFunction, Request, Response } from "express";
import { HTTPError } from "lambert-server";
import { checkToken } from "discord-server-util";
import { checkToken } from "fosscord-server-util";
export const NO_AUTHORIZATION_ROUTES = ["/api/v8/auth/login", "/api/v8/auth/register"];

View File

@ -1,6 +1,6 @@
import { NextFunction, Request, Response } from "express";
import Config from "../util/Config";
import { db } from "discord-server-util";
import { db } from "fosscord-server-util";
export async function GlobalRateLimit(req: Request, res: Response, next: NextFunction) {
if (!Config.get().limits.rate.ip.enabled) return next();

View File

@ -1,5 +1,5 @@
import { NextFunction, Request, Response } from "express";
import { db } from "discord-server-util";
import { db } from "fosscord-server-util";
import { getIpAdress } from "./GlobalRateLimit";

View File

@ -177,6 +177,7 @@ router.post(
email: adjusted_email,
flags: 0n, // TODO: generate default flags
hash: adjusted_password,
guilds: [],
valid_tokens_since: Date.now(),
user_settings: {
afk_timeout: 300,

View File

@ -1,6 +1,6 @@
import mongoose from "mongoose";
import { Long } from "mongodb";
import { Snowflake } from "discord-server-util";
import { Snowflake } from "fosscord-server-util";
async function main() {
const conn = await mongoose.createConnection(

View File

@ -1,4 +1,4 @@
import { Config } from "discord-server-util";
import { Config } from "fosscord-server-util";
import crypto from "crypto";
import fs from "fs";