mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-08 22:53:25 +00:00
feat: add api controllers and routes for browser extension
This commit is contained in:
12
app/api/links/routes/api_create_link_routes.ts
Normal file
12
app/api/links/routes/api_create_link_routes.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { middleware } from '#start/kernel';
|
||||
import router from '@adonisjs/core/services/router';
|
||||
|
||||
const CreateLinkController = () =>
|
||||
import('#api/links/controllers/create_link_controller');
|
||||
|
||||
router
|
||||
.group(() => {
|
||||
router.post('', [CreateLinkController, 'execute']).as('api-links.create');
|
||||
})
|
||||
.prefix('/api/v1/links')
|
||||
.middleware([middleware.auth({ guards: ['api'] })]);
|
||||
Reference in New Issue
Block a user