FIX ROUTES

This commit is contained in:
2021-08-23 17:32:39 +02:00
parent 95965106ad
commit bb9ac0156b

View File

@@ -19,8 +19,9 @@ Route.group(() => {
Route.resource('/informations', 'InformationsController').only(['index', 'update'])
Route.resource('/posts', 'PostsController').only(['index', 'destroy'])
Route.group(() => {
Route.resource('/', 'PostsController').only(['index', 'show', 'destroy'])
Route.get('/:slug', 'PostsController.show')
Route.post('/:slug/like', 'PostsController.like')
Route.post('/:slug/unlike', 'PostsController.unlike')
}).prefix('/posts')