2017-09-06 10:21:07 -04:00
|
|
|
require_dependency 'flag_query'
|
|
|
|
|
|
|
|
class Admin::FlaggedTopicsController < Admin::AdminController
|
|
|
|
|
|
|
|
def index
|
|
|
|
result = FlagQuery.flagged_topics
|
|
|
|
|
2017-09-12 13:04:53 -04:00
|
|
|
render_json_dump(
|
|
|
|
{
|
|
|
|
flagged_topics: serialize_data(result[:flagged_topics], FlaggedTopicSummarySerializer),
|
|
|
|
users: serialize_data(result[:users], BasicUserSerializer),
|
|
|
|
},
|
|
|
|
rest_serializer: true
|
|
|
|
)
|
2017-09-06 10:21:07 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|