mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-18 02:31:56 +10:00
release: v3.6.9
This commit is contained in:
@ -55,7 +55,7 @@ const validationSchema = Joi.object({
|
||||
STORAGE_SECRET_KEY: Joi.string().allow(''),
|
||||
|
||||
// Cache
|
||||
PDF_DELETION_TIME: Joi.number().default(6 * 24 * 60 * 60 * 1000), // 6 days
|
||||
PDF_DELETION_TIME: Joi.number().default(4 * 24 * 60 * 60 * 1000), // 4 days
|
||||
});
|
||||
|
||||
@Module({
|
||||
|
||||
@ -3,11 +3,7 @@ import { HealthCheck, HealthCheckService, HttpHealthIndicator, TypeOrmHealthIndi
|
||||
|
||||
@Controller('health')
|
||||
export class HealthController {
|
||||
constructor(
|
||||
private health: HealthCheckService,
|
||||
private db: TypeOrmHealthIndicator,
|
||||
private http: HttpHealthIndicator
|
||||
) {}
|
||||
constructor(private health: HealthCheckService, private db: TypeOrmHealthIndicator) {}
|
||||
|
||||
@Get()
|
||||
@HealthCheck()
|
||||
|
||||
@ -7,7 +7,11 @@ 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> {
|
||||
printAsPdf(
|
||||
@Param('username') username: string,
|
||||
@Param('slug') slug: string,
|
||||
@Query('lastUpdated') lastUpdated: string
|
||||
): Promise<string> {
|
||||
return this.printerService.printAsPdf(username, slug, lastUpdated);
|
||||
}
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ export class PrinterService implements OnModuleInit, OnModuleDestroy {
|
||||
await mkdir(directory, { recursive: true });
|
||||
await writeFile(join(directory, filename), pdfBytes);
|
||||
|
||||
// Delete PDF artifacts after pdfDeletionTime ms
|
||||
// Delete PDF artifacts after `pdfDeletionTime` ms
|
||||
const timeout = setTimeout(async () => {
|
||||
try {
|
||||
await unlink(join(directory, filename));
|
||||
|
||||
Reference in New Issue
Block a user