Working on posts

This commit is contained in:
2021-08-23 17:55:49 +02:00
parent bb9ac0156b
commit 8c5032fa72
15 changed files with 101 additions and 12 deletions

View File

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