mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-24 15:31:26 +00:00
Update AdminReportController
This commit is contained in:
parent
b464eee966
commit
28990280ef
1 changed files with 19 additions and 0 deletions
|
@ -1593,6 +1593,25 @@ trait AdminReportController
|
|||
return new AdminModeratedProfileResource($profile);
|
||||
}
|
||||
|
||||
public function exportModeratedProfiles(Request $request)
|
||||
{
|
||||
return response()->streamDownload(function () {
|
||||
$profiles = ModeratedProfile::get();
|
||||
$res = AdminModeratedProfileResource::collection($profiles);
|
||||
echo json_encode([
|
||||
'_pixelfed_export' => true,
|
||||
'meta' => [
|
||||
'ns' => 'https://pixelfed.org',
|
||||
'origin' => config('pixelfed.domain.app'),
|
||||
'date' => now()->format('c'),
|
||||
'type' => 'moderated-profiles',
|
||||
'version' => "1.0"
|
||||
],
|
||||
'data' => $res
|
||||
], JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);
|
||||
}, 'data-export.json');
|
||||
}
|
||||
|
||||
public function deleteModeratedProfile(Request $request)
|
||||
{
|
||||
$this->validate($request, [
|
||||
|
|
Loading…
Reference in a new issue