I am super new to the Play Framework and just started my first experiences with the play-scala-rest-api-example. I copied the post package as a new user package, added the UserRouter
to the routes and appended the UserRepository
to the Module configurations.
Everything works fine, it's just that I get an 404 error when visiting /v1/users
. Only /v1/users/
works. For posts both with and without the slash at the end call the index route. I didn't change anything but renaming the classes and objects. Like I said I just started to play around with the framework and possibly it is something super trivial.
Here the routes file:
GET / controllers.HomeController.index
-> /v1/posts api.post.PostRouter
-> /v1/users api.user.UserRouter
# Map static resources from the /public folder to the /assets URL path
GET /assets/*file controllers.Assets.at(path="/public", file)
`
/v1/users
and the routes look the same. – Lando-L