Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory Segment API missing MMO features #23

Open
AlinaNova21 opened this issue May 9, 2019 · 0 comments
Open

Memory Segment API missing MMO features #23

AlinaNova21 opened this issue May 9, 2019 · 0 comments

Comments

@AlinaNova21
Copy link
Contributor

router.get('/memory-segment', auth.tokenAuth, jsonResponse((request) => {
var id = parseInt(request.query.segment);
if(_.isNaN(id) || id < 0 || id > 99) {
return q.reject('invalid segment ID');
}
return env.hget(env.keys.MEMORY_SEGMENTS+request.user._id, id)
.then(data => {
return {data};
})
}));

The memory segment api is missing the multiple segment option, for example, on MMO I can do

GET /api/user/memory-segment?segment=1,2

And get back a structure like this: { ok: 1, data: [ "segment1", "segment2" ] }
The private server is missing this feature, and only returns the first segment .

On that note, it returning a string for one and array for multiple is more annoying with static languages, buts thats a different issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant