Browse Source

deep copy API bug fix

master
kj1352 4 years ago
parent
commit
517a6cc701
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      src/user-profile/profile-routes.ts

+ 4
- 1
src/user-profile/profile-routes.ts View File

@@ -38,7 +38,6 @@ userProfileRoutes.get('/deep-copy/', jwtAuthentication, async (request, response
_id: { $in: user.categories.map(id => new ObjectId(id)) }
}).toArray();


try {
for (let i = 0; i < allCategories.length; i += 1) {
if (allCategories[i].shelves) {
@@ -63,6 +62,10 @@ userProfileRoutes.get('/deep-copy/', jwtAuthentication, async (request, response
...allCategories[i],
shelves,
});
} else {
allDeepCategories.push({
...allCategories[i];
})
}
}
} catch {


Loading…
Cancel
Save