mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-25 11:43:07 +01:00
Merge branch 'master' of github.com:fosscord/fosscord-server
This commit is contained in:
commit
2a6d6b2dd2
@ -44,7 +44,7 @@ const options: RouteOptions = {
|
||||
router.get("/", route(options), (req: Request, res: Response) => {
|
||||
const { endpointPublic } = Config.get().gateway;
|
||||
res.json({
|
||||
url: endpointPublic || process.env.GATEWAY || "ws://localhost:3002",
|
||||
url: endpointPublic || process.env.GATEWAY || "ws://localhost:3001",
|
||||
shards: 1,
|
||||
session_start_limit: {
|
||||
total: 1000,
|
||||
|
@ -37,7 +37,7 @@ const options: RouteOptions = {
|
||||
router.get("/", route(options), (req: Request, res: Response) => {
|
||||
const { endpointPublic } = Config.get().gateway;
|
||||
res.json({
|
||||
url: endpointPublic || process.env.GATEWAY || "ws://localhost:3002",
|
||||
url: endpointPublic || process.env.GATEWAY || "ws://localhost:3001",
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -29,7 +29,7 @@ router.get("/", route({}), async (req: Request, res: Response) => {
|
||||
gateway:
|
||||
gateway.endpointPublic ||
|
||||
process.env.GATEWAY ||
|
||||
"ws://localhost:3002",
|
||||
"ws://localhost:3001",
|
||||
defaultApiVersion: api.defaultVersion ?? 9,
|
||||
apiEndpoint: api.endpointPublic ?? "/api",
|
||||
};
|
||||
|
@ -50,7 +50,7 @@ router.post(
|
||||
const path = `attachments/${channel_id}/${id}/${filename}`;
|
||||
|
||||
const endpoint =
|
||||
Config.get()?.cdn.endpointPublic || "http://localhost:3003";
|
||||
Config.get()?.cdn.endpointPublic || "http://localhost:3001";
|
||||
|
||||
await storage.set(path, buffer);
|
||||
let width;
|
||||
|
@ -63,7 +63,7 @@ router.post(
|
||||
|
||||
const path = `avatars/${user_id}/${hash}`;
|
||||
const endpoint =
|
||||
Config.get().cdn.endpointPublic || "http://localhost:3003";
|
||||
Config.get().cdn.endpointPublic || "http://localhost:3001";
|
||||
|
||||
await storage.set(path, buffer);
|
||||
|
||||
|
@ -59,7 +59,7 @@ router.post("/", multer.single("file"), async (req: Request, res: Response) => {
|
||||
if (ANIMATED_MIME_TYPES.includes(type.mime)) hash = `a_${hash}`; // animated icons have a_ infront of the hash
|
||||
|
||||
const path = `guilds/${guild_id}/users/${user_id}/avatars/${hash}`;
|
||||
const endpoint = Config.get().cdn.endpointPublic || "http://localhost:3003";
|
||||
const endpoint = Config.get().cdn.endpointPublic || "http://localhost:3001";
|
||||
|
||||
await storage.set(path, buffer);
|
||||
|
||||
|
@ -62,7 +62,7 @@ router.post(
|
||||
|
||||
const path = `role-icons/${role_id}/${hash}.png`;
|
||||
const endpoint =
|
||||
Config.get().cdn.endpointPublic || "http://localhost:3003";
|
||||
Config.get().cdn.endpointPublic || "http://localhost:3001";
|
||||
|
||||
await storage.set(path, buffer);
|
||||
|
||||
|
@ -36,7 +36,7 @@ export async function uploadFile(
|
||||
});
|
||||
|
||||
const response = await fetch(
|
||||
`${Config.get().cdn.endpointPrivate || "http://localhost:3003"}${path}`,
|
||||
`${Config.get().cdn.endpointPrivate || "http://localhost:3001"}${path}`,
|
||||
{
|
||||
headers: {
|
||||
signature: Config.get().security.requestSignature,
|
||||
@ -75,7 +75,7 @@ export async function handleFile(
|
||||
|
||||
export async function deleteFile(path: string) {
|
||||
const response = await fetch(
|
||||
`${Config.get().cdn.endpointPrivate || "http://localhost:3003"}${path}`,
|
||||
`${Config.get().cdn.endpointPrivate || "http://localhost:3001"}${path}`,
|
||||
{
|
||||
headers: {
|
||||
signature: Config.get().security.requestSignature,
|
||||
|
Loading…
Reference in New Issue
Block a user