Chore: lint
All checks were successful
Build and push image / release-image (push) Successful in 1m32s

This commit is contained in:
2025-07-10 18:02:49 +08:00
parent 6ab755d91a
commit 4e3ac71c78
2 changed files with 4 additions and 6 deletions

View File

@@ -59,8 +59,8 @@ export class AppController {
throw new HttpException(`No such file '${pkg}'`, HttpStatus.NOT_FOUND); throw new HttpException(`No such file '${pkg}'`, HttpStatus.NOT_FOUND);
if (range !== undefined) { if (range !== undefined) {
res.set('Content-Length', `${output.ContentLength}`) res.set('Content-Length', `${output.ContentLength}`);
res.set('Content-Range', `${output.ContentRange}`) res.set('Content-Range', `${output.ContentRange}`);
} }
return new StreamableFile(output.Body as Readable); return new StreamableFile(output.Body as Readable);
} }

View File

@@ -1,5 +1,4 @@
import { Readable } from 'stream'; import { Injectable } from '@nestjs/common';
import { Injectable, HttpException, HttpStatus } from '@nestjs/common';
import { ConfigService } from '@nestjs/config'; import { ConfigService } from '@nestjs/config';
import { import {
S3Client, S3Client,
@@ -37,8 +36,7 @@ export class AppService {
try { try {
return await this.s3Client.send(command); return await this.s3Client.send(command);
} catch (err: unknown) { } catch (err: unknown) {
if (err instanceof NoSuchKey) if (err instanceof NoSuchKey) return null;
return null;
throw err; throw err;
} }
} }