Added/Updated admin dashboard tables
• Added: - New Account filtering - PreviewCard viewing/sorting/filtering deleting (todo) - DeletePreviewCardWorker, Service - Status viewing/sorting/filtering deleting - ChatMessage viewing/sorting/filtering deleting (todo) - Account > Follows view • Updated: - LinkBlock to sort alphabetically - Groups to be under "Moderation" instead of "Admin" in navigation.rb - Status in admin to have group name/link - Reports reset button - Group filtering/sorting - LinkBlock filtering/sorting - Account now has bio and few more data points in dashboard
This commit is contained in:
23
app/services/delete_preview_card_service.rb
Normal file
23
app/services/delete_preview_card_service.rb
Normal file
@@ -0,0 +1,23 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class DeletePreviewCardService < BaseService
|
||||
include Redisable
|
||||
|
||||
def call(preview_card)
|
||||
return if preview_card.nil?
|
||||
|
||||
@preview_card = preview_card
|
||||
|
||||
RedisLock.acquire(lock_options) do |lock|
|
||||
if lock.acquired?
|
||||
@preview_card.destroy!
|
||||
else
|
||||
raise GabSocial::RaceConditionError
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def lock_options
|
||||
{ redis: Redis.current, key: "distribute_preview_card:#{@preview_card.id}" }
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user