Bläddra i källkod

deep copy API bug fix

master
kj1352 4 år sedan
förälder
incheckning
517a6cc701
1 ändrade filer med 4 tillägg och 1 borttagningar
  1. +4
    -1
      src/user-profile/profile-routes.ts

+ 4
- 1
src/user-profile/profile-routes.ts Visa fil

@@ -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 {


Laddar…
Avbryt
Spara