File

apps/recallassess/recallassess-api/src/api/admin/report-log/report-log.controller.ts

Prefix

api/admin/report-log

Extends

Index

Methods

Methods

Async getPdfUrl
getPdfUrl(id: string)
Decorators :
@Get(':id/pdf-url')

Get PDF URL for a report log

Parameters :
Name Type Optional Description
id string No

Report log ID

Returns : Promise<literal type>

Presigned S3 URL for the PDF

import { BaseController } from "@bish-nest/core/controller/base.controller";
import { Controller, Get, Param, NotFoundException } from "@nestjs/common";
import { ReportLogService } from "./services/report-log.service";

@Controller("api/admin/report-log")
export class ReportLogController extends BaseController<ReportLogService> {
  constructor(reportLogService: ReportLogService) {
    super(reportLogService);
  }

  /**
   * Get PDF URL for a report log
   * @param id Report log ID
   * @returns Presigned S3 URL for the PDF
   */
  @Get(":id/pdf-url")
  async getPdfUrl(@Param("id") id: string): Promise<{ pdfUrl: string }> {
    return this.entityService.getPdfUrl(Number.parseInt(id, 10));
  }
}

results matching ""

    No results matching ""