* 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:
@@ -1,6 +1,6 @@
|
||||
import { APIUtils } from "../../apiutils.ts";
|
||||
import express from "express";
|
||||
import Profile from "../../data/profiles.ts";
|
||||
import { Profile } from "../../data/profiles.ts";
|
||||
import { z } from "zod";
|
||||
|
||||
export const route = APIUtils.createRouter("/account");
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user