diff --git a/services/apps/assignments/src/embedding/embedding.controller.ts b/services/apps/assignments/src/embedding/embedding.controller.ts index 877110840..1fb03a467 100644 --- a/services/apps/assignments/src/embedding/embedding.controller.ts +++ b/services/apps/assignments/src/embedding/embedding.controller.ts @@ -1,15 +1,14 @@ import {Controller, ForbiddenException, Get, Param, ParseBoolPipe, Post, Query} from '@nestjs/common'; import { ApiCreatedResponse, - ApiExtraModels, ApiForbiddenResponse, ApiOkResponse, - ApiOperation, ApiParam, + ApiOperation, + ApiParam, ApiTags, - refs } from "@nestjs/swagger"; import {AssignmentAuth} from "../assignment/assignment-auth.decorator"; -import {Embeddable, EmbeddingEstimate, SnippetEmbeddable, TaskEmbeddable} from "./embedding.dto"; +import {Embeddable, EmbeddingEstimate} from "./embedding.dto"; import {EmbeddingService} from "./embedding.service"; import {notFound} from "@mean-stream/nestx"; import {AssignmentService} from "../assignment/assignment.service"; diff --git a/services/apps/assignments/src/embedding/openai.service.ts b/services/apps/assignments/src/embedding/openai.service.ts index adf3636e6..3d6038986 100644 --- a/services/apps/assignments/src/embedding/openai.service.ts +++ b/services/apps/assignments/src/embedding/openai.service.ts @@ -16,7 +16,7 @@ export class OpenAIService implements OnModuleDestroy { countTokens(files: File[]): number { let total = 0; - for (let file of files) { + for (const file of files) { if (!this.isSupportedExtension(file.name)) { continue; } diff --git a/services/apps/assignments/src/solution/solution.dto.ts b/services/apps/assignments/src/solution/solution.dto.ts index 8b61ad607..12b181b5c 100644 --- a/services/apps/assignments/src/solution/solution.dto.ts +++ b/services/apps/assignments/src/solution/solution.dto.ts @@ -1,4 +1,4 @@ -import {ApiProperty, ApiPropertyOptional, OmitType, PartialType} from '@nestjs/swagger'; +import {ApiPropertyOptional, OmitType, PartialType} from '@nestjs/swagger'; import {Types} from 'mongoose'; import {Solution} from './solution.schema'; import {AsObjectId} from "@mean-stream/nestx"; diff --git a/services/apps/assignments/src/solution/solution.service.ts b/services/apps/assignments/src/solution/solution.service.ts index 8fe828ffa..28edb05ce 100644 --- a/services/apps/assignments/src/solution/solution.service.ts +++ b/services/apps/assignments/src/solution/solution.service.ts @@ -55,12 +55,12 @@ export class SolutionService { const update: UpdateQuery = rest; if (author) { - for (let [k, v] of Object.entries(author)) { + for (const [k, v] of Object.entries(author)) { update['author.' + k] = v; } } if (consent) { - for (let [k, v] of Object.entries(consent)) { + for (const [k, v] of Object.entries(consent)) { update['consent.' + k] = v; } } diff --git a/services/apps/assignments/src/utils.ts b/services/apps/assignments/src/utils.ts index 73a969370..7757ce7ed 100644 --- a/services/apps/assignments/src/utils.ts +++ b/services/apps/assignments/src/utils.ts @@ -3,7 +3,7 @@ import {WsResponse} from '@nestjs/websockets'; import {isUUID} from 'class-validator'; import {randomBytes} from 'crypto'; import {FilterQuery} from 'mongoose'; -import {interval, map, mapTo, merge, Observable, tap} from 'rxjs'; +import {interval, map, mapTo, merge, Observable} from 'rxjs'; export function generateToken(): string { const bytes = randomBytes(8); diff --git a/services/apps/projects/src/project/project.service.ts b/services/apps/projects/src/project/project.service.ts index 596819ebb..7c9770723 100644 --- a/services/apps/projects/src/project/project.service.ts +++ b/services/apps/projects/src/project/project.service.ts @@ -50,7 +50,7 @@ export class ProjectService { } private removeStorage(id: string) { - for (let type of projectStorageTypes) { + for (const type of projectStorageTypes) { fs.promises.rm(this.getStoragePath(type, id), {recursive: true}).catch(e => { console.error(`Failed to remove project '${id}' storage '${type}': ${e.message}`); });