FLINT AND STEEL!!!! THE NETHER!!!!!! RELEASE!!!!!!!!!
* Account bio support (fetch only route right now)
* Room cloning fixes
- Dorm Room cloning is still broken
* Instance changing fixes
* Presence: VRMovementMode and StatusVisibility updates automatically
* Routes for the above two properties
* Settings can take numbers, too (enums)
* No microtransations in my game (parental controls)
* A whole lotta routes for various unfinished but planned features
- Equipment
- Consumables
- Objectives
- Checklist (orientation rewards)
- Objectives (three daily tasks)
- Image metadata
- Community Board
- Player Events
- Storefronts
* Matchmaking instance querying
- Empty instances are not yet cleared
* Avatar items, saved avatars, save current avatar routes
* No loading screen tips for now
* Send presence at an interval over the socket
- Error FROSTBITE is reported in the game logs during bootup sometimes. Maybe due to the lack of ping messages?
* Socket push notifications
Note to self: Set up deno compilation in runners on gitea
This commit is contained in:
@@ -17,17 +17,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
import { APIUtils } from "../../apiutils.ts";
|
||||
import express from "express";
|
||||
import { Profile } from "../../data/profiles.ts";
|
||||
import UnifiedProfile, { Profile } from "../../data/profiles.ts";
|
||||
import { z } from "zod";
|
||||
|
||||
export const route = APIUtils.createRouter("/account");
|
||||
|
||||
interface CreateAccountRequestBody {
|
||||
platform: string;
|
||||
platformId: string;
|
||||
deviceId: string;
|
||||
}
|
||||
|
||||
const CreateAccountRequestBodySchema = z.object({
|
||||
platform: z.string(),
|
||||
platformId: z.string(),
|
||||
@@ -106,4 +100,33 @@ route.router.get("/me",
|
||||
|
||||
},
|
||||
|
||||
);
|
||||
|
||||
interface BioFetchParams {
|
||||
id?: string
|
||||
}
|
||||
route.router.get('/:id/bio',
|
||||
|
||||
APIUtils.Authentication,
|
||||
|
||||
async (rq: express.Request<BioFetchParams>, rs: express.Response) => {
|
||||
|
||||
const unparsedId = rq.params.id;
|
||||
if (!unparsedId) {
|
||||
rs.sendStatus(500);
|
||||
return;
|
||||
}
|
||||
const parsedId = parseInt(unparsedId);
|
||||
if (isNaN(parsedId)) {
|
||||
rs.sendStatus(400);
|
||||
return;
|
||||
}
|
||||
const player = UnifiedProfile.get(parsedId);
|
||||
|
||||
rs.json({
|
||||
accountId: parsedId,
|
||||
bio: await player.getBio(),
|
||||
});
|
||||
}
|
||||
|
||||
);
|
||||
Reference in New Issue
Block a user