Skip to content

Commit

Permalink
fix: linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Ihar committed May 8, 2024
1 parent 15c2063 commit f3e9516
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion api-gateway/src/helpers/interceptors/multipart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { getFileFromPart } from './utils/index.js';
//types and interfaces
import { FastifyRequest, MultipartFile, MultipartOptions } from './types/index.js';


export function AnyFilesInterceptor(options: MultipartOptions = {}): Type<NestInterceptor> {
class MixinInterceptor implements NestInterceptor {
async intercept(context: ExecutionContext, next: CallHandler): Promise<Observable<any>> {
Expand Down
5 changes: 3 additions & 2 deletions api-gateway/src/helpers/interceptors/utils/multipart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { MultipartFile as MultipartFileFastify} from '@fastify/multipart';
//types and interfaces
import { MultipartFile, MultipartOptions } from '../types/index.js';


export const getFileFromPart = async (part: MultipartFileFastify): Promise<MultipartFile> => {
const buffer: Buffer = await part.toBuffer()
return {
Expand All @@ -30,7 +29,9 @@ export const validateFile = (file: MultipartFile, options: MultipartOptions): st
}

for (const validator of validators) {
if (validator.isValid(file)) continue;
if (validator.isValid(file)) {
continue
}

return validator.buildErrorMessage(file);
}
Expand Down

0 comments on commit f3e9516

Please sign in to comment.