Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: The user's bookmarks are updated by unrelated user's operation #7670

Merged
merged 1 commit into from
May 19, 2023

Conversation

jam411
Copy link
Contributor

@jam411 jam411 commented May 19, 2023

@jam411 jam411 requested a review from yuki-takei May 19, 2023 03:09
@jam411 jam411 self-assigned this May 19, 2023
@jam411 jam411 temporarily deployed to VRT May 19, 2023 03:24 — with GitHub Actions Inactive
@reg-suit
Copy link

reg-suit bot commented May 19, 2023

reg-suit detected visual differences.

Check this report, and review them.

⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪

What do the circles mean? The number of circles represent the number of changed images.
🔴 : Changed items, ⚪ : New items, ⚫ : Deleted items, and 🔵 Passed items

How can I change the check status? If reviewers approve this PR, the reg context status will be green automatically.

@@ -215,7 +215,7 @@ bookmarkFolderSchema.statics.updateBookmark = async function(pageId: Types.Objec
Promise<BookmarkFolderDocument | null> {
// If isBookmarked
if (status) {
const bookmarkedPage = await Bookmark.findOne({ page: pageId });
const bookmarkedPage = await Bookmark.findOne({ page: pageId, user: userId });
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user も見るように修正

Comment on lines -91 to -93
if (isBookmarked) {
await toggleBookmarkHandler();
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

この呼び出しは不要

@yuki-takei yuki-takei merged commit 854218e into master May 19, 2023
@yuki-takei yuki-takei deleted the fix/122559-122560-can-delete-other-user-bookmark branch May 19, 2023 06:02
@github-actions github-actions bot mentioned this pull request May 19, 2023
@yuki-takei yuki-takei changed the title fix: Check userId when updateBookmark fix: The user's bookmarks are updated by unrelated user's operation May 21, 2023
@yuki-takei yuki-takei mentioned this pull request May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants