Skip to content

Commit

Permalink
Fixing unbookmarking functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Aayush-Agnihotri committed Nov 15, 2023
1 parent 2d6131f commit 0d56657
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/repos/UserRepo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ const unbookmarkArticle = async (uuid: string, articleID: string): Promise<User>

if (articleIndex === -1) return user;

user.followedOrganizations.splice(articleIndex, 1);
user.bookmarkedArticles.splice(articleIndex, 1);
return user.save();
}
return user;
Expand All @@ -280,7 +280,7 @@ const unbookmarkMagazine = async (uuid: string, magazineID: string): Promise<Use

if (magazineIndex === -1) return user;

user.followedOrganizations.splice(magazineIndex, 1);
user.bookmarkedMagazines.splice(magazineIndex, 1);
return user.save();
}
return user;
Expand All @@ -297,7 +297,7 @@ const unbookmarkFlyer = async (uuid: string, flyerID: string): Promise<User> =>

if (flyerIndex === -1) return user;

user.followedOrganizations.splice(flyerIndex, 1);
user.bookmarkedFlyers.splice(flyerIndex, 1);
return user.save();
}
return user;
Expand Down

0 comments on commit 0d56657

Please sign in to comment.