Add in-app notifications for moderation actions/warnings (#30065)
This commit is contained in:
parent
0ec061aa8f
commit
4ef0b48b95
13 changed files with 188 additions and 21 deletions
15
app/serializers/rest/appeal_serializer.rb
Normal file
15
app/serializers/rest/appeal_serializer.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class REST::AppealSerializer < ActiveModel::Serializer
|
||||
attributes :text, :state
|
||||
|
||||
def state
|
||||
if object.approved?
|
||||
'approved'
|
||||
elsif object.rejected?
|
||||
'rejected'
|
||||
else
|
||||
'pending'
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue