Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit b71a3ea

Browse files
authored
Specify the child profile id for is-parent-of (#300)
Since removal of the userId, we needed a new reference
1 parent 55f3ff4 commit b71a3ea

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/users/is-parent-of.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ function isParentOf (args, cb) {
1010
if (_.isUndefined(childrenId) && args.params.profile) childrenId = args.params.profile.userId;
1111
if (_.isUndefined(childrenId) && args.params.query) childrenId = args.params.query.userId;
1212
if (_.isUndefined(childrenId) && args.params.profileId) childrenProfileId = args.params.profileId;
13+
if (_.isUndefined(childrenId) && args.params.profile) childrenProfileId = args.params.profile.id;
1314
if (_.isUndefined(childrenId) && args.params.id) childrenId = args.params.id;
1415
// Used by invite-parent-guardian
1516
if (_.isUndefined(childrenId) && args.params.data) childrenId = args.params.data.childId;

0 commit comments

Comments
 (0)