Browse Source

fix: using invalid session could lead to backend errors

Kristian Vos 3 years ago
parent
commit
6606f9b26a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      backend/logic/actions/users.js

+ 2 - 2
backend/logic/actions/users.js

@@ -1530,7 +1530,7 @@ export default {
 					else next(null, user);
 				}
 			],
-			async (err, { preferences }) => {
+			async (err, user) => {
 				if (err) {
 					err = await UtilsModule.runJob("GET_ERROR", { error: err }, this);
 
@@ -1552,7 +1552,7 @@ export default {
 				return cb({
 					status: "success",
 					message: "Preferences successfully retrieved",
-					data: { preferences }
+					data: { preferences: user.preferences }
 				});
 			}
 		);