apps/recallassess/recallassess-api/src/api/shared/email/controllers/email-template-update-pending.controller.ts
api/admin/email-template
Extra actions for email templates (recallassess). Base CRUD is provided by BNestEmailTemplateController at the same path.
Methods |
|
| Async updatePendingEmailLogs | ||||||
updatePendingEmailLogs(id: number)
|
||||||
Decorators :
@Post(':id/update-pending-email-logs')
|
||||||
|
Update all PENDING email logs that use this template with the latest template subject/body and mail-merge (per-log participant/course/company). Call this after editing a template so scheduled emails send the updated content. POST /api/admin/email-template/:id/update-pending-email-logs
Parameters :
Returns :
unknown
|
import { Controller, Param, ParseIntPipe, Post } from "@nestjs/common";
import { UpdatePendingEmailLogsService } from "../services/update-pending-email-logs.service";
/**
* Extra actions for email templates (recallassess).
* Base CRUD is provided by BNestEmailTemplateController at the same path.
*/
@Controller("api/admin/email-template")
export class EmailTemplateUpdatePendingController {
constructor(private readonly updatePendingEmailLogsService: UpdatePendingEmailLogsService) {}
/**
* Update all PENDING email logs that use this template with the latest
* template subject/body and mail-merge (per-log participant/course/company).
* Call this after editing a template so scheduled emails send the updated content.
* POST /api/admin/email-template/:id/update-pending-email-logs
*/
@Post(":id/update-pending-email-logs")
async updatePendingEmailLogs(@Param("id", ParseIntPipe) id: number) {
return this.updatePendingEmailLogsService.updatePendingEmailLogsForTemplate(id);
}
}