Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `app/controllers/settings/preferences_controller.rb`: Upstream dropping `digest` from notifications emails while we have more notification emails settings. Removed `digest` from our list while keeping our extra settings. - `app/javascript/packs/admin.js`: Conflicts caused by glitch-soc's theming system. Applied the changes to `app/javascript/core/admin.js`. - `app/views/settings/preferences/other/show.html.haml`: Upstream removed a setting close to a glitch-soc-only setting. Applied upstream's change.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class REST::Admin::CanonicalEmailBlockSerializer < ActiveModel::Serializer
|
||||
attributes :id, :canonical_email_hash
|
||||
|
||||
def id
|
||||
object.id.to_s
|
||||
end
|
||||
end
|
@@ -0,0 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class REST::Admin::EmailDomainBlockSerializer < ActiveModel::Serializer
|
||||
attributes :id, :domain, :created_at, :history
|
||||
|
||||
def id
|
||||
object.id.to_s
|
||||
end
|
||||
end
|
14
app/serializers/rest/admin/ip_block_serializer.rb
Normal file
14
app/serializers/rest/admin/ip_block_serializer.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class REST::Admin::IpBlockSerializer < ActiveModel::Serializer
|
||||
attributes :id, :ip, :severity, :comment,
|
||||
:created_at, :expires_at
|
||||
|
||||
def id
|
||||
object.id.to_s
|
||||
end
|
||||
|
||||
def ip
|
||||
"#{object.ip}/#{object.ip.prefix}"
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user