-
Notifications
You must be signed in to change notification settings - Fork 1
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
#527 회원 탈퇴 구현 #528
Open
kmc7468
wants to merge
13
commits into
dev
Choose a base branch
from
#527-account-delete
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
#527 회원 탈퇴 구현 #528
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c4ce04b
Add: /users/delete endpoint
kmc7468 dd6d7c1
Add: personal information delete cronjob
kmc7468 f11f158
Refactor: rename withdraw-related endpoint/schema
kmc7468 3e87619
Add: restore withdraw field of userSchema
kmc7468 e7926e5
Refactor: check if user withdrew when populating chat and user documents
kmc7468 996b9ee
Refactor: use userOid instead of userId
kmc7468 c340df9
Refactor: check if user withdrew when populating documents
kmc7468 670eae6
Refactor: now remove FCM device tokens when withdrawing
kmc7468 00ddb69
Docs: withdraw endpoint swagger
kmc7468 7c596a9
Add: authorIsWithdraw field
kmc7468 d9ed57b
Fix: chat.authorId can be nullish value
kmc7468 826ee1a
Fix: withdrew user populate error
kmc7468 69127d5
Add: withdraw field in room/report related responses
kmc7468 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
const { userModel } = require("../modules/stores/mongo"); | ||
const logger = require("../modules/logger"); | ||
|
||
module.exports = async () => { | ||
try { | ||
// 탈퇴일로부터 1년 이상 경과한 사용자의 개인정보 삭제 | ||
await userModel.updateMany( | ||
{ | ||
withdraw: true, | ||
withdrawAt: { $lte: new Date(Date.now() - 365 * 24 * 60 * 60 * 1000) }, | ||
name: { $ne: "" }, | ||
}, | ||
{ | ||
$set: { | ||
name: "", | ||
nickname: "", | ||
id: "", | ||
profileImageUrl: "", | ||
// ongoingRoom | ||
// doneRoom | ||
ban: false, | ||
// joinat | ||
agreeOnTermsOfService: false, | ||
"subinfo.kaist": "", | ||
"subinfo.sparcs": "", | ||
"subinfo.facebook": "", | ||
"subinfo.twitter": "", | ||
email: "", | ||
isAdmin: false, | ||
account: "", | ||
}, | ||
$unset: { | ||
phoneNumber: "", | ||
}, | ||
} | ||
); | ||
} catch (err) { | ||
logger.error(err); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chat 의 authorId 값이 User._id인데, 굳이 userId를 따로 채팅에서 긁어와서 처리하는 이유가 있나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
원래 구현이 이렇게 되어 있더라구요..! 개인적인 뇌피셜로는 한 번에 여러 명이 입장할 수도 있어서 이렇게 만들어 두신게 아닌가 싶습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이번 기회에 함께 수정해 버릴까요?