Problem creating a new GET request to findOne by slug

@SorinGFS Is right, you actually defined two identical routes. So the second one is totally ignored.

Define the second route like this:

/posts/slug/:slug.

That way you will be able to access your posts by slugs

/posts/slug/my-test-slug-name

1 Like