core icon indicating copy to clipboard operation
core copied to clipboard

Stacked routes return wrong results with locals.send

Open etsuo opened this issue 8 years ago • 0 comments

@Route({
    method: 'get',
    path: ':id'
})
async getById(req, res, next) {
     if(req.params.id === 'suggestions') {
        return;
    }
}

@Route({
    method: 'get',
    path: '/suggestions'
})
async getById(req, res, next) {
     res.locals.send(OK, []);
}

GET /suggestions returns {} instead of []

etsuo avatar Jun 18 '18 17:06 etsuo