refactor: move routes in dedicated files + improve routes management

This commit is contained in:
Sonny
2024-05-16 17:58:00 +02:00
committed by Sonny
parent 6b5aba6f84
commit 19b96650e9
14 changed files with 163 additions and 39 deletions

12
start/routes/app.ts Normal file
View File

@@ -0,0 +1,12 @@
import router from '@adonisjs/core/services/router';
const AppsController = () => import('#controllers/apps_controller');
/**
* All routes for both logged and guest users
*/
router.group(() => {
router.get('/', [AppsController, 'index']).as('home');
router
.post('/user/theme', [AppsController, 'updateUserTheme'])
.as('user.theme');
});