From 64e4c002e9f2c605345d35c691d09f81ef2f5a16 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 13 Sep 2019 19:54:38 -0600 Subject: [PATCH] Update ApiController --- app/Http/Controllers/Api/ApiV1Controller.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index 1cca94293..069c3d726 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -22,6 +22,8 @@ class ApiV1Controller extends Controller { public function apps(Request $request) { + abort_if(!config('pixelfed.oauth_enabled'), 404); + $this->validate($request, [ 'client_name' => 'required', 'redirect_uris' => 'required', @@ -38,7 +40,9 @@ class ApiV1Controller extends Controller { 'password_client' => false, 'revoked' => false, ]); + $client->save(); + $res = [ 'id' => $client->id, 'name' => $client->name,