mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-08 14:43:24 +00:00
15 lines
409 B
TypeScript
15 lines
409 B
TypeScript
import { middleware } from '#start/kernel';
|
|
import router from '@adonisjs/core/services/router';
|
|
|
|
const GetCollectionsController = () =>
|
|
import('#api/collections/controllers/get_collections_controller');
|
|
|
|
router
|
|
.group(() => {
|
|
router
|
|
.get('', [GetCollectionsController, 'show'])
|
|
.as('api-collections.index');
|
|
})
|
|
.prefix('/api/v1/collections')
|
|
.middleware([middleware.auth({ guards: ['api'] })]);
|