Skip to content

rewrite url when no params fails to pass query strings #431

@Nilegfx

Description

@Nilegfx

works

var rewrites = {'/postsWithAuthor/:id': '/posts/:id?_embed=authors'}
app.use(jsonServer.rewriter(rewrites))

not working because it doesn't update req.query object, it only update the url

var rewrites = {'/postsWithAuthor/': '/posts?_embed=authors'}
app.use(jsonServer.rewriter(rewrites))

I'll do a quick PR for to fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions