Conditions | 1 |
Total Lines | 7 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import {ConfigService} from '@nestjs/config'; |
||
7 | |||
8 | public async location(uploadedDate: Date): Promise<string> { |
||
9 | const destination = await this.configService.get<string>('UPLOAD_LOCATION'); |
||
10 | const month = uploadedDate.getMonth() + 1; |
||
11 | const year = uploadedDate.getFullYear(); |
||
12 | |||
13 | return `${destination}/${year}/${month}`; |
||
14 | } |
||
16 |