feat: add create link form

This commit is contained in:
Sonny
2024-05-09 23:14:42 +02:00
committed by Sonny
parent 2cf8c5ae02
commit 73f8c0c513
16 changed files with 244 additions and 64 deletions

View File

@@ -2,6 +2,7 @@ import PATHS from '#constants/paths';
import { middleware } from '#start/kernel';
import router from '@adonisjs/core/services/router';
const LinksController = () => import('#controllers/links_controller');
const CollectionsController = () =>
import('#controllers/collections_controller');
const UsersController = () => import('#controllers/users_controller');
@@ -22,5 +23,8 @@ router
'showCreatePage',
]);
router.post('/collections', [CollectionsController, 'store']);
router.get(PATHS.LINK.CREATE, [LinksController, 'showCreatePage']);
router.post('/links', [LinksController, 'store']);
})
.middleware([middleware.auth()]);