Skip to content

Memory Segment API missing MMO features #23

@AlinaNova21

Description

@AlinaNova21

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions