File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
packages/velog-scripts/scripts Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,12 @@ class Runner implements IRunner {
25
25
const user = await this . findUsersByUsername ( username )
26
26
const posts = await this . findWritenPostsByUserId ( user . id )
27
27
28
- // add block list
29
- await this . blockList . addBlockList ( username )
28
+ const blockList = await this . blockList . readBlockList ( )
29
+
30
+ if ( blockList . includes ( username ) ) {
31
+ console . log ( `${ username } 유저는 이미 등록되어 있습니다.` )
32
+ continue
33
+ }
30
34
31
35
if ( posts . length === 0 ) {
32
36
console . log ( `${ user . username } 유저의 비공개 처리 할 게시글이 없습니다.` )
@@ -40,9 +44,12 @@ class Runner implements IRunner {
40
44
user . profile ?. display_name || null ,
41
45
)
42
46
47
+ if ( ! askResult . is_set_private ) continue
48
+
43
49
const postIds = posts . map ( ( { id } ) => id ! )
50
+ // add block list
51
+ await this . blockList . addBlockList ( username )
44
52
45
- if ( ! askResult . is_set_private ) continue
46
53
// set private = true
47
54
await this . setIsPrivatePost ( postIds )
48
55
You can’t perform that action at this time.
0 commit comments