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