mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 22:41:27 +00:00
Update SettingsController
This commit is contained in:
parent
326a1b353a
commit
507fbb90c0
1 changed files with 15 additions and 0 deletions
|
@ -4,6 +4,7 @@ namespace App\Http\Controllers;
|
|||
|
||||
use App\AccountLog;
|
||||
use App\Following;
|
||||
use App\Report;
|
||||
use App\UserFilter;
|
||||
use Auth, DB, Cache, Purify;
|
||||
use Carbon\Carbon;
|
||||
|
@ -160,6 +161,7 @@ class SettingsController extends Controller
|
|||
if(config('pixelfed.account_deletion') == false) {
|
||||
abort(404);
|
||||
}
|
||||
|
||||
$user = Auth::user();
|
||||
if($user->is_admin == true) {
|
||||
return abort(400, 'You cannot delete an admin account.');
|
||||
|
@ -175,5 +177,18 @@ class SettingsController extends Controller
|
|||
Auth::logout();
|
||||
return redirect('/');
|
||||
}
|
||||
|
||||
public function requestFullExport(Request $request)
|
||||
{
|
||||
$user = Auth::user();
|
||||
return view('settings.export.show');
|
||||
}
|
||||
|
||||
public function reportsHome(Request $request)
|
||||
{
|
||||
$profile = Auth::user()->profile;
|
||||
$reports = Report::whereProfileId($profile->id)->orderByDesc('created_at')->paginate(10);
|
||||
return view('settings.reports', compact('reports'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue