expose recommended posts to everyone

This commit is contained in:
r888888888
2018-07-21 23:25:06 -07:00
committed by Albert Yi
parent a669fe361c
commit cc7a66438f
5 changed files with 28 additions and 10 deletions

View File

@@ -28,7 +28,12 @@ class UploadService
if preprocessor.completed?
@upload = preprocessor.finish!
create_post_from_upload(@upload)
begin
create_post_from_upload(@upload)
rescue Exception => x
@upload.update(status: "error: #{x.class} - #{x.message}", backtrace: x.backtrace.join("\n"))
end
return @upload
end
@@ -78,8 +83,6 @@ class UploadService
@post = convert_to_post(upload)
@post.save!
upload.update(status: "error: " + @post.errors.full_messages.join(", "))
if upload.context && upload.context["ugoira"]
PixivUgoiraFrameData.create(
post_id: @post.id,