* Unified profiles, rather than instantiating profiles every time we want to access one

* Socket and live instance changes
* Possible problem with Deno's handling of sockets, compatibility issue with Node?
This commit is contained in:
2025-03-27 20:00:17 -04:00
parent dd7d929918
commit 492129df17
15 changed files with 147 additions and 82 deletions

View File

@@ -1,6 +1,6 @@
import { APIUtils, NoBody } from "../../apiutils.ts";
import express from "express";
import Profile from "../../data/profiles.ts";
import UnifiedProfile, { Profile } from "../../data/profiles.ts";
import { decode } from "@gz/jwt";
import { Config } from "../../config.ts";
import Logging from "@proxnet/undead-logging";
@@ -143,7 +143,7 @@ route.router.post("/token",
rs.locals.user.addAssociatedDeviceId(rq.body.device_id);
rs.locals.user.addAssociatedPlatformId(rq.body.platform_id);
const profile = new Profile(targetAccount);
const profile = UnifiedProfile.get(targetAccount);
if (!(await Profile.exists(profile.getId()))) {
requestFailed();
return;