discourse/app/serializers/admin_badge_serializer.rb
Martin Brennan 77081de027
FIX: Badge image uploader (#28188)
In the formkit conversion in 2ca06ba236
we missed setting a type for the UppyImageUploader for badges. Also,
we were not passing down the `image_url` as form data, so when we used
`data.image` for that field the badge was not updating in the UI after
page loads and the image URL was not loading for preview.

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2024-08-01 15:36:17 +02:00

20 lines
359 B
Ruby

# frozen_string_literal: true
class AdminBadgeSerializer < BadgeSerializer
attributes :query,
:trigger,
:target_posts,
:auto_revoke,
:show_posts,
:i18n_name,
:image_upload_id
def include_long_description?
true
end
def include_i18n_name?
object.system?
end
end