mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-13 08:13:49 +10:00
18 lines
503 B
TypeScript
18 lines
503 B
TypeScript
import { Controller, Get, Param, Query } from '@nestjs/common';
|
|
|
|
import { PrinterService } from './printer.service';
|
|
|
|
@Controller('printer')
|
|
export class PrinterController {
|
|
constructor(private readonly printerService: PrinterService) {}
|
|
|
|
@Get('/:username/:slug')
|
|
printAsPdf(
|
|
@Param('username') username: string,
|
|
@Param('slug') slug: string,
|
|
@Query('lastUpdated') lastUpdated: string
|
|
): Promise<string> {
|
|
return this.printerService.printAsPdf(username, slug, lastUpdated);
|
|
}
|
|
}
|