release: v3.6.9

This commit is contained in:
Amruth Pillai
2022-11-13 14:28:47 +01:00
parent 89b35392bd
commit 8026241b6c
59 changed files with 1600 additions and 1527 deletions

View File

@ -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({

View File

@ -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()

View File

@ -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);
}
}

View File

@ -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));