Add notifications to user when a follow profile posted

This commit is contained in:
Adolfo Reyna
2024-12-31 16:28:31 -05:00
parent 433f3069b3
commit d79138fba6
3 changed files with 30 additions and 2 deletions

View File

@@ -198,6 +198,16 @@ userDB = (DB) => {
});
}
DB.getFollowingTheProfile = async (profileId) => {
//const profile_id = DB.ObjectID(profileId);
let r = await DB.profileCols.find({ following: (profileId+'') })
.toArray().catch((err) => {
console.log(err);
return [];
});
return r;
}
DB.getData = async (profileid, key) => {
let profile = await DB.getProfile(profileid);
return profile.data[key];