Custom Rooms + Server global
All checks were successful
Galvanic Corrosion Cross-Compile / build (push) Successful in 49s
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:
@@ -17,7 +17,6 @@ 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 { decode } from "@gz/jwt";
|
||||
import { Config } from "../../config.ts";
|
||||
import Logging from "@proxnet/undead-logging";
|
||||
@@ -26,6 +25,7 @@ import { AuthType } from "../../data/users.ts";
|
||||
import { Redis } from "../../db.ts";
|
||||
import { validVersions } from "../api/versioncheck.ts";
|
||||
import { Steam } from "../../data/steam.ts";
|
||||
import Server from "../../data/server.ts";
|
||||
|
||||
const config = Config.getConfig();
|
||||
|
||||
@@ -190,8 +190,8 @@ route.router.post("/token",
|
||||
rs.locals.user.addAssociatedPlatformId(rq.body.platform_id);
|
||||
Redis.Database.sadd(Redis.buildKey(Redis.KeyGroups.PlatformAssociations, rq.body.platform_id), targetAccount);
|
||||
|
||||
const profile = UnifiedProfile.get(targetAccount);
|
||||
if (!(await Profile.exists(profile.getId()))) {
|
||||
const profile = Server.UnifiedProfile.get(targetAccount);
|
||||
if (!profile) {
|
||||
requestFailed();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user