Skip to content

Commit

Permalink
Fix bug in deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Ell1ott committed Apr 11, 2024
1 parent 37d8b65 commit 6168d9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"type": "module",
"dependencies": {
"@akademiaapp/schema": "1.0.25",
"@akademiaapp/schema": "1.0.26",
"axios": "^1.6.8",
"cookie-parser": "~1.4.6",
"cors": "^2.8.5",
Expand Down
9 changes: 1 addition & 8 deletions routes/assignments.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,7 @@ router.post("/:id/deploy", async function (req, res, next) {
})
.map((g) => g.userId);

students_ids = [
...students_ids,
...(
await prisma.user.findMany({
where: { user_id: { in: deployed_assignment.asigned_users_ids } },
})
).map((u) => u.id),
];
students_ids = [...students_ids, ...deployed_assignment.asigned_users_ids];
// Filter out duplicates
const unique_students_ids = students_ids.filter(
(v, i, a) => a.findIndex((t) => t === v) === i
Expand Down

0 comments on commit 6168d9d

Please sign in to comment.