From 4e3ac71c78f5185d95db45eaf6c9c4f529495908 Mon Sep 17 00:00:00 2001 From: Yi-Ting Shih Date: Thu, 10 Jul 2025 18:02:49 +0800 Subject: [PATCH] Chore: lint --- src/app.controller.ts | 4 ++-- src/app.service.ts | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/app.controller.ts b/src/app.controller.ts index 272567d..1b0eb83 100644 --- a/src/app.controller.ts +++ b/src/app.controller.ts @@ -59,8 +59,8 @@ export class AppController { throw new HttpException(`No such file '${pkg}'`, HttpStatus.NOT_FOUND); if (range !== undefined) { - res.set('Content-Length', `${output.ContentLength}`) - res.set('Content-Range', `${output.ContentRange}`) + res.set('Content-Length', `${output.ContentLength}`); + res.set('Content-Range', `${output.ContentRange}`); } return new StreamableFile(output.Body as Readable); } diff --git a/src/app.service.ts b/src/app.service.ts index d28f529..adef9c9 100644 --- a/src/app.service.ts +++ b/src/app.service.ts @@ -1,5 +1,4 @@ -import { Readable } from 'stream'; -import { Injectable, HttpException, HttpStatus } from '@nestjs/common'; +import { Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { S3Client, @@ -37,8 +36,7 @@ export class AppService { try { return await this.s3Client.send(command); } catch (err: unknown) { - if (err instanceof NoSuchKey) - return null; + if (err instanceof NoSuchKey) return null; throw err; } }