mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 23:15:36 +00:00
refactor: split backend by context instead of type 'controllers/models/...'
This commit is contained in:
14
app/search/routes/search_routes.ts
Normal file
14
app/search/routes/search_routes.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { middleware } from '#start/kernel';
|
||||
import router from '@adonisjs/core/services/router';
|
||||
|
||||
const SearchesController = () =>
|
||||
import('#search/controllers/search_controller');
|
||||
|
||||
/**
|
||||
* Search routes
|
||||
*/
|
||||
router
|
||||
.group(() => {
|
||||
router.get('/search', [SearchesController, 'search']).as('search');
|
||||
})
|
||||
.middleware([middleware.auth()]);
|
||||
Reference in New Issue
Block a user