From ca30e6c6d5c966208426d7790644947921efb68c Mon Sep 17 00:00:00 2001 From: Adrian Kunz Date: Wed, 13 Dec 2023 13:37:54 +0100 Subject: [PATCH] fix(assignments-service): Missing SolutionService.bulkWrite return type --- services/apps/assignments/src/classroom/classroom.service.ts | 4 ++-- services/apps/assignments/src/solution/solution.service.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/apps/assignments/src/classroom/classroom.service.ts b/services/apps/assignments/src/classroom/classroom.service.ts index 0f17ae4a6..68224ef28 100644 --- a/services/apps/assignments/src/classroom/classroom.service.ts +++ b/services/apps/assignments/src/classroom/classroom.service.ts @@ -55,7 +55,7 @@ export class ClassroomService { await Promise.all(files.map(async (file, index) => { const stream = createReadStream(file.path); const solution = solutions.upsertedIds[index]; - return this.fileService.importZipEntries(stream, assignment.id, solution); + return this.fileService.importZipEntries(stream, assignment.id, solution.toString()); })); } @@ -151,7 +151,7 @@ export class ClassroomService { if (commit && upsertedId) { const zip = await this.getRepoZip(assignment, this.getGithubName(repo, assignment), commit); if (zip) { - await this.fileService.importZipEntries(zip, assignment.id, upsertedId, commit); + await this.fileService.importZipEntries(zip, assignment.id, upsertedId.toString(), commit); } } })); diff --git a/services/apps/assignments/src/solution/solution.service.ts b/services/apps/assignments/src/solution/solution.service.ts index f5a21d95e..9ece95142 100644 --- a/services/apps/assignments/src/solution/solution.service.ts +++ b/services/apps/assignments/src/solution/solution.service.ts @@ -144,7 +144,7 @@ export class SolutionService extends MongooseRepository { return solution.token === token || !!user && user.sub === solution.createdBy; } - bulkWrite(map: any) { + bulkWrite(map: any): Promise<{ upsertedIds: Record }> { return this.model.bulkWrite(map); }