File tree 2 files changed +7
-13
lines changed
2 files changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -32,19 +32,17 @@ def post_params(content)
32
32
end
33
33
34
34
def comments_params ( comment_content )
35
- # NOTE: DocBaseのJSONエクスポート機能にコメントが暗号化されたまま出力される不備があり、
36
- # 問い合わせた結果修正待ちの状態
37
35
body_md = <<~EOT
38
36
created_at: #{ comment_content [ 'created_at' ] }
39
- user_id : #{ comment_content [ 'user_id ' ] }
37
+ user : #{ comment_content [ 'username ' ] }
40
38
41
39
42
- #{ reupload comment_content [ 'encrypted_comment ' ] }
40
+ #{ reupload comment_content [ 'body ' ] }
43
41
EOT
44
42
45
43
{
46
44
body_md : body_md ,
47
- # user: screen_name_for(comment_content['user']['name '])
45
+ user : screen_name_for ( comment_content [ 'username ' ] )
48
46
}
49
47
end
50
48
end
Original file line number Diff line number Diff line change @@ -38,14 +38,10 @@ def import(dry_run: true, start_index: 0)
38
38
exit 1
39
39
end
40
40
41
- # NOTE: DocBaseのJSONエクスポート機能にコメントが暗号化されたまま出力される不備があり、
42
- # 問い合わせた結果修正待ちの状態
43
- # このままインポート処理をしても読めないコメントがつくので、一旦コメントアウト
44
-
45
- # post_number = response.body['number']
46
- # params[:comments].each do |comment_param|
47
- # client.create_comment(post_number, comment_param)
48
- # end
41
+ post_number = response . body [ 'number' ]
42
+ params [ :comments ] . each do |comment_param |
43
+ client . create_comment ( post_number , comment_param )
44
+ end
49
45
end
50
46
end
51
47
You can’t perform that action at this time.
0 commit comments