mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-08 14:43:24 +00:00
feat: add create link form
This commit is contained in:
@@ -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()]);
|
||||
|
||||
Reference in New Issue
Block a user