1
0
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:
Madeline 2023-01-26 14:30:34 +11:00
commit 2a6d6b2dd2
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47
8 changed files with 9 additions and 9 deletions

View File

@ -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,

View File

@ -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",
});
});

View File

@ -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",
};

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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,