Fix non-existent 'content_html' on empty comment section

このコミットが含まれているのは:
Omar Roth 2018-08-07 10:01:46 -05:00
コミット a5fb1d38e0
1個のファイルの変更5行の追加0行の削除

ファイルの表示

@ -1708,7 +1708,12 @@ get "/api/v1/comments/:id" do |env|
ctoken = body.match(/'COMMENTS_TOKEN': "(?<ctoken>[^"]+)"/)
if !ctoken
env.response.content_type = "application/json"
if format == "json"
next {"comments" => [] of String}.to_json
else
next {"content_html" => ""}.to_json
end
end
ctoken = ctoken["ctoken"]
itct = body.match(/itct=(?<itct>[^"]+)"/).not_nil!["itct"]