Custom Rooms + Server global
All checks were successful
Galvanic Corrosion Cross-Compile / build (push) Successful in 49s

* Added Storage and room saving (will be moved to events later)
* Moved `UnifiedProfile` to new `Server` object, along with `CDN`
    - Will move `Rooms` and others to this later
This commit is contained in:
2025-05-24 21:20:30 -04:00
parent ac2701acec
commit 648d46986c
23 changed files with 623 additions and 74 deletions

View File

@@ -17,9 +17,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */
import { APIUtils, NoBody } from "../../apiutils.ts";
import express from "express";
import UnifiedProfile, { Profile } from "../../data/profiles.ts";
import { Profile } from "../../data/profiles.ts";
import { z } from "zod";
import { AuthType } from "../../data/users.ts";
import Server from "../../data/server.ts";
export const route = APIUtils.createRouter("/account");
@@ -142,7 +143,11 @@ route.router.get('/:id/bio',
rs.sendStatus(400);
return;
}
const player = UnifiedProfile.get(parsedId);
const player = Server.UnifiedProfile.get(parsedId);
if (!player) {
rs.status(404).json(APIUtils.genericResponseFormat(true, "Profile not found"));
return;
}
rs.json({
accountId: parsedId,