Explorar el Código

bug fix

master
kj1352 hace 4 años
padre
commit
f03b627327
Se han modificado 1 ficheros con 12 adiciones y 0 borrados
  1. +12
    -0
      src/user-profile/profile-routes.ts

+ 12
- 0
src/user-profile/profile-routes.ts Ver fichero

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

if (allCategories === undefined) {
response.status(200);
response.json({
_id: user._id,
name: user.name,
email: user.email,
isVerified: user.isVerified,
categories: []
});
return;
}

try {
for (let i = 0; i < allCategories.length; i += 1) {
if (allCategories[i].shelves) {


Cargando…
Cancelar
Guardar