Skip to content

Commit

Permalink
fix(assignments-service): Missing SolutionService.bulkWrite return type
Browse files Browse the repository at this point in the history
  • Loading branch information
Clashsoft committed Dec 13, 2023
1 parent 9732097 commit ca30e6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions services/apps/assignments/src/classroom/classroom.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}));
}

Expand Down Expand Up @@ -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);
}
}
}));
Expand Down
2 changes: 1 addition & 1 deletion services/apps/assignments/src/solution/solution.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export class SolutionService extends MongooseRepository<Solution> {
return solution.token === token || !!user && user.sub === solution.createdBy;
}

bulkWrite(map: any) {
bulkWrite(map: any): Promise<{ upsertedIds: Record<number, Types.ObjectId> }> {
return this.model.bulkWrite(map);
}

Expand Down

0 comments on commit ca30e6c

Please sign in to comment.