mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-22 12:19:09 +00:00
feat: Nudge users to become template creators if eligible (#8357)
This commit is contained in:
21
packages/cli/src/controllers/cta.controller.ts
Normal file
21
packages/cli/src/controllers/cta.controller.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import express from 'express';
|
||||
import { Authorized, Get, RestController } from '@/decorators';
|
||||
import { AuthenticatedRequest } from '@/requests';
|
||||
import { CtaService } from '@/services/cta.service';
|
||||
|
||||
/**
|
||||
* Controller for Call to Action (CTA) endpoints. CTAs are certain
|
||||
* messages that are shown to users in the UI.
|
||||
*/
|
||||
@Authorized()
|
||||
@RestController('/cta')
|
||||
export class CtaController {
|
||||
constructor(private readonly ctaService: CtaService) {}
|
||||
|
||||
@Get('/become-creator')
|
||||
async getCta(req: AuthenticatedRequest, res: express.Response) {
|
||||
const becomeCreator = await this.ctaService.getBecomeCreatorCta(req.user.id);
|
||||
|
||||
res.json(becomeCreator);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user