mirror of
https://github.com/spacebarchat/server.git
synced 2026-07-26 10:11:02 +00:00
Fix cloud attachments (dont circular import in cdn)
This commit is contained in:
@@ -21,7 +21,7 @@ import { Router, Response, Request } from "express";
|
||||
import { fileTypeFromBuffer } from "file-type";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { Config } from "@spacebar/util";
|
||||
import { storage, multer, cache, cacheNotFound } from "@spacebar/cdn/util";
|
||||
import { storage, multer, cache, cacheNotFound } from "../util";
|
||||
|
||||
// TODO: check premium and animated pfp are allowed in the config
|
||||
// TODO: generate different sizes of icon
|
||||
|
||||
@@ -21,7 +21,7 @@ import { Router, Response, Request } from "express";
|
||||
import { fileTypeFromBuffer } from "file-type";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { Config } from "@spacebar/util";
|
||||
import { storage, multer, cache, cacheNotFound } from "@spacebar/cdn/util";
|
||||
import { storage, multer, cache, cacheNotFound } from "../util";
|
||||
|
||||
// TODO: check premium and animated pfp are allowed in the config
|
||||
// TODO: generate different sizes of icon
|
||||
|
||||
@@ -22,7 +22,7 @@ import imageSize from "image-size";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { CloudAttachment } from "@spacebar/database";
|
||||
import { Config, hasValidSignature, NewUrlUserSignatureData, Snowflake, UrlSignResult } from "@spacebar/util";
|
||||
import { storage, multer, cache } from "@spacebar/cdn/util";
|
||||
import { storage, multer, cache } from "../util";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
import { Router, Response, Request } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { fileTypeFromBuffer } from "file-type";
|
||||
import { storage, cache } from "@spacebar/cdn/util";
|
||||
import { storage, cache } from "../util";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import { Router, Response, Request } from "express";
|
||||
import { fileTypeFromBuffer } from "file-type";
|
||||
import { Config } from "@spacebar/util";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { storage, multer, cache } from "@spacebar/cdn/util";
|
||||
import { storage, multer, cache } from "../util";
|
||||
|
||||
// TODO: check premium and animated pfp are allowed in the config
|
||||
// TODO: generate different sizes of icon
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
import { Router, Response, Request } from "express";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { fileTypeFromBuffer } from "file-type";
|
||||
import { storage, cache } from "@spacebar/cdn/util";
|
||||
import { storage, cache } from "../util";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import { Router, Response, Request } from "express";
|
||||
import { fileTypeFromBuffer } from "file-type";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { Config } from "@spacebar/util";
|
||||
import { storage, multer, cache, cacheNotFound } from "@spacebar/cdn/util";
|
||||
import { storage, multer, cache, cacheNotFound } from "../util";
|
||||
|
||||
// TODO: check premium and animated pfp are allowed in the config
|
||||
// TODO: generate different sizes of icon
|
||||
|
||||
@@ -21,7 +21,7 @@ import { Router, Response, Request } from "express";
|
||||
import { fileTypeFromBuffer } from "file-type";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { Config } from "@spacebar/util";
|
||||
import { storage, multer, cache, cacheNotFound } from "@spacebar/cdn/util";
|
||||
import { storage, multer, cache, cacheNotFound } from "../util";
|
||||
|
||||
// TODO: check premium and animated pfp are allowed in the config
|
||||
// TODO: generate different sizes of icon
|
||||
|
||||
@@ -21,7 +21,7 @@ import { Router, Response, Request } from "express";
|
||||
import { fileTypeFromBuffer } from "file-type";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { Config } from "@spacebar/util";
|
||||
import { storage, multer, cache, cacheNotFound } from "@spacebar/cdn/util";
|
||||
import { storage, multer, cache, cacheNotFound } from "../util";
|
||||
|
||||
// TODO: check premium and animated pfp are allowed in the config
|
||||
// TODO: generate different sizes of icon
|
||||
|
||||
@@ -21,7 +21,7 @@ import { Router, Response, Request } from "express";
|
||||
import { fileTypeFromBuffer } from "file-type";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { Config } from "@spacebar/util";
|
||||
import { storage, multer, cache, cacheNotFound } from "@spacebar/cdn/util";
|
||||
import { storage, multer, cache, cacheNotFound } from "../util";
|
||||
|
||||
// TODO: check premium and animated pfp are allowed in the config
|
||||
// TODO: generate different sizes of icon
|
||||
|
||||
@@ -21,7 +21,7 @@ import { join } from "node:path";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { fileTypeFromBuffer } from "file-type";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { cache } from "@spacebar/cdn/util";
|
||||
import { cache } from "../util";
|
||||
|
||||
const defaultAvatarHashMap = new Map([
|
||||
["0", "4a8562cf00887030c416d3ec2d46385a"],
|
||||
|
||||
@@ -21,7 +21,7 @@ import { Router, Response, Request } from "express";
|
||||
import { fileTypeFromBuffer } from "file-type";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { Config } from "@spacebar/util";
|
||||
import { storage, multer, cache, cacheNotFound } from "@spacebar/cdn/util";
|
||||
import { storage, multer, cache, cacheNotFound } from "../util";
|
||||
|
||||
// TODO: check premium and animated pfp are allowed in the config
|
||||
// TODO: generate different sizes of icon
|
||||
|
||||
@@ -21,7 +21,7 @@ import { Request, Response, Router } from "express";
|
||||
import { fileTypeFromBuffer } from "file-type";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { Config } from "@spacebar/util";
|
||||
import { storage, multer, cache } from "@spacebar/cdn/util";
|
||||
import { storage, multer, cache } from "../util";
|
||||
|
||||
// TODO: check premium and animated pfp are allowed in the config
|
||||
// TODO: generate different sizes of icon
|
||||
|
||||
@@ -21,7 +21,7 @@ import { Router, Response, Request } from "express";
|
||||
import { fileTypeFromBuffer } from "file-type";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { Config } from "@spacebar/util";
|
||||
import { storage, multer, cache, cacheNotFound } from "@spacebar/cdn/util";
|
||||
import { storage, multer, cache, cacheNotFound } from "../util";
|
||||
|
||||
// TODO: check premium and animated pfp are allowed in the config
|
||||
// TODO: generate different sizes of icon
|
||||
|
||||
@@ -21,7 +21,7 @@ import { Router, Response, Request } from "express";
|
||||
import { fileTypeFromBuffer } from "file-type";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { Config } from "@spacebar/util";
|
||||
import { storage, multer, cache } from "@spacebar/cdn/util";
|
||||
import { storage, multer, cache } from "../util";
|
||||
|
||||
//Role icons ---> avatars.ts modified
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import crypto from "node:crypto";
|
||||
import { fileTypeFromBuffer } from "file-type";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { Config } from "@spacebar/util";
|
||||
import { storage, multer, cache, cacheNotFound } from "@spacebar/cdn/util";
|
||||
import { storage, multer, cache, cacheNotFound } from "../util";
|
||||
|
||||
// TODO: check premium and animated pfp are allowed in the config
|
||||
// TODO: generate different sizes of icon
|
||||
|
||||
@@ -21,7 +21,7 @@ import { Router, Response, Request } from "express";
|
||||
import { fileTypeFromBuffer } from "file-type";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { Config } from "@spacebar/util";
|
||||
import { storage, multer, cache, cacheNotFound } from "@spacebar/cdn/util";
|
||||
import { storage, multer, cache, cacheNotFound } from "../util";
|
||||
|
||||
// TODO: check premium and animated pfp are allowed in the config
|
||||
// TODO: generate different sizes of icon
|
||||
|
||||
@@ -21,7 +21,7 @@ import { Router, Response, Request } from "express";
|
||||
import { fileTypeFromBuffer } from "file-type";
|
||||
import { HTTPError } from "lambert-server/HTTPError";
|
||||
import { Config } from "@spacebar/util";
|
||||
import { storage, multer, cache, cacheNotFound } from "@spacebar/cdn/util";
|
||||
import { storage, multer, cache, cacheNotFound } from "../util";
|
||||
|
||||
// TODO: check premium and animated pfp are allowed in the config
|
||||
// TODO: generate different sizes of icon
|
||||
|
||||
Reference in New Issue
Block a user