Chore: lint
All checks were successful
Build and push image / release-image (push) Successful in 1m32s
All checks were successful
Build and push image / release-image (push) Successful in 1m32s
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user