File

apps/recallassess/recallassess-api/src/api/shared/email/controllers/email-template-update-pending.controller.ts

Prefix

api/admin/email-template

Description

Extra actions for email templates (recallassess). Base CRUD is provided by BNestEmailTemplateController at the same path.

Index

Methods

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 :
Name Type Optional
id number No
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);
  }
}

results matching ""

    No results matching ""