Added get user bookmark🔖
This commit is contained in:
@@ -60,4 +60,13 @@ export async function removePollIdFromBookmark(userId, pollId) {
|
||||
catch{
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
export async function getUserBookmarkedPolls(userId) {
|
||||
try {
|
||||
const user = await UserModel.findById(userId).populate("bookmarks");
|
||||
return user.bookmarks;
|
||||
} catch (err) {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user