Skip to content

Commit

Permalink
style(services): Fix lint problems
Browse files Browse the repository at this point in the history
  • Loading branch information
Clashsoft committed Sep 24, 2023
1 parent 717f3d4 commit 8b99a34
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion services/apps/assignments/src/embedding/openai.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion services/apps/assignments/src/solution/solution.dto.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
4 changes: 2 additions & 2 deletions services/apps/assignments/src/solution/solution.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ export class SolutionService {

const update: UpdateQuery<Solution> = 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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion services/apps/assignments/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion services/apps/projects/src/project/project.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
});
Expand Down

0 comments on commit 8b99a34

Please sign in to comment.