casual-simulation / casualos

Casual Open Simulation for the Web
https://ab1.bot
MIT License
48 stars 9 forks source link

Implement `xpGetUserMeta` procedure #506

Open KallynGowdy opened 1 month ago

KallynGowdy commented 1 month ago

Name: xpGetUserMeta HTTP: GET /api/v2/xp/user/meta Authentication: REQUIRED - sessionKey Input: none Operation: Get XpUser metadata by sessionKey.userId. Should validate the user ID and return information about the user's XpUser. The returned information should be limited to the information specified below. Success Output:

{
    success: true,
    accountBalance: 123, // 0 if not a coach
    accountCurrency: 'usd',
    requestedRate: 0,
    ...getUserInfo(userId)
}