mirror of
https://github.com/sakaljurgis/kodi-api-server.git
synced 2026-07-09 04:47:41 +00:00
ditch nestjs config module, add static config serfice
This commit is contained in:
@@ -7,6 +7,7 @@ import { readdir, stat } from 'fs/promises';
|
||||
import { Stats } from 'fs';
|
||||
import { join } from 'path';
|
||||
import FileDto from './Dto/file.dto';
|
||||
import { configService } from '../config/config.service';
|
||||
|
||||
@Injectable()
|
||||
export class StaticService {
|
||||
@@ -17,7 +18,7 @@ export class StaticService {
|
||||
);
|
||||
}
|
||||
|
||||
const path = join(__dirname, process.env.STATIC_SERVE_FOLDER, relPath);
|
||||
const path = join(configService.getStaticFolder(), relPath);
|
||||
|
||||
const stats: Stats | false = await stat(path).catch(() => false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user