mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat(core): Set up backend modules (#17448)
This commit is contained in:
14
scripts/backend-module/my-feature.controller.template
Normal file
14
scripts/backend-module/my-feature.controller.template
Normal file
@@ -0,0 +1,14 @@
|
||||
import { AuthenticatedRequest } from '@n8n/db';
|
||||
import { Get, RestController } from '@n8n/decorators';
|
||||
|
||||
import { MyFeatureService } from './my-feature.service';
|
||||
|
||||
@RestController('/my-feature')
|
||||
export class MyFeatureController {
|
||||
constructor(private readonly myFeatureService: MyFeatureService) {}
|
||||
|
||||
@Get('/summary')
|
||||
async getSummary(_req: AuthenticatedRequest, _res: Response) {
|
||||
return await this.myFeatureService.getSummary();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user