Skip to content

Commit 28f22fe

Browse files
committed
fix: blockList logic in privatePostsOfSpamAccount.mts
1 parent 2f94fba commit 28f22fe

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

packages/not-shared/scripts/privatePostsOfSpamAccount.mts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ class Runner implements IRunner {
3939
// add block list
4040
if (blockList.includes(username)) {
4141
console.log(`${username} 유저는 이미 등록되어 있습니다.`)
42+
} else {
43+
await this.blockList.addBlockList(username)
44+
console.log(`${username} 유저가 blockList에 등록되었습니다.`)
4245
}
4346

4447
if (posts.length === 0) {
@@ -61,8 +64,6 @@ class Runner implements IRunner {
6164
// set private = true
6265
await this.setIsPrivatePost(postIds)
6366

64-
await this.blockList.addBlockList(username)
65-
6667
const blockUesrInfo: BlockUserInfo = {
6768
id: user.id,
6869
username: user.username,
@@ -91,8 +92,6 @@ class Runner implements IRunner {
9192
userInfo: userInfo,
9293
}),
9394
)
94-
95-
console.log(`${userInfo.username} 유저가 처리 되었습니다.`)
9695
})
9796

9897
await Promise.all(promises)

0 commit comments

Comments
 (0)