mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-15 09:11:57 +10:00
fix #1095: make PDF_DELETION_TIME optional, add default value
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { registerAs } from '@nestjs/config';
|
||||
|
||||
export default registerAs('cache', () => ({
|
||||
pdfDeletionTime: parseInt(process.env.PDF_DELETION_TIME, 10),
|
||||
pdfDeletionTime: parseInt(process.env.PDF_DELETION_TIME, 10) || 4 * 24 * 60 * 60 * 1000, // 4 days
|
||||
}));
|
||||
|
||||
@ -55,7 +55,9 @@ const validationSchema = Joi.object({
|
||||
STORAGE_SECRET_KEY: Joi.string().allow(''),
|
||||
|
||||
// Cache
|
||||
PDF_DELETION_TIME: Joi.number().default(4 * 24 * 60 * 60 * 1000), // 4 days
|
||||
PDF_DELETION_TIME: Joi.number()
|
||||
.default(4 * 24 * 60 * 60 * 1000) // 4 days
|
||||
.allow(''),
|
||||
});
|
||||
|
||||
@Module({
|
||||
|
||||
Reference in New Issue
Block a user