This commit is contained in:
Kiss Dávid
2025-07-18 10:27:33 +02:00
commit 590adb271d
40 changed files with 8792 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
/*
|--------------------------------------------------------------------------
| Routes file
|--------------------------------------------------------------------------
|
| The routes file is used for defining the HTTP routes.
|
*/
import router from '@adonisjs/core/services/router'
import { middleware } from '#start/kernel'
import { throttle } from '#start/limiter'
const AuthController = () => import('#controllers/auth_controller')
router.post('/register', [AuthController, 'register']).as('auth.register').use(throttle)
router.post('/login', [AuthController, 'login']).as('auth.login').use(throttle)
router.delete('/logout', [AuthController, 'logout']).as('auth.logout').use(middleware.auth())
router.get('/me', [AuthController, 'me']).as('auth.me').use(middleware.auth())