From 50baae52693b0d540f2b920e3283da1a84515070 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 23 Mar 2022 16:59:18 -0600 Subject: [PATCH 1/2] Update ApiV1Controller, fix apps endpoint --- app/Http/Controllers/Api/ApiV1Controller.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index a0bdbfb46..e9d8163a7 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -102,9 +102,7 @@ class ApiV1Controller extends Controller $this->validate($request, [ 'client_name' => 'required', - 'redirect_uris' => 'required', - 'scopes' => 'nullable', - 'website' => 'nullable' + 'redirect_uris' => 'required' ]); $uris = implode(',', explode('\n', $request->redirect_uris)); @@ -122,11 +120,11 @@ class ApiV1Controller extends Controller $client->save(); $res = [ - 'id' => $client->id, + 'id' => (string) $client->id, 'name' => $client->name, 'website' => null, 'redirect_uri' => $client->redirect, - 'client_id' => $client->id, + 'client_id' => (string) $client->id, 'client_secret' => $client->secret, 'vapid_key' => null ]; From ad475c1f6020998d675cf7cdb034b8b4d5e04118 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 23 Mar 2022 17:01:38 -0600 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26546c892..69d283808 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -98,6 +98,7 @@ - Updated ApiV1Controller, fix context entities. ([b1ab41e0](https://github.com/pixelfed/pixelfed/commit/b1ab41e0)) - Updated ApiV1Controller, fix timeline default limit. ([a87f8301](https://github.com/pixelfed/pixelfed/commit/a87f8301)) - Updated ApiV1Controller, fix search v2 entities. ([9dac861e](https://github.com/pixelfed/pixelfed/commit/9dac861e)) +- Updated ApiV1Controller, fix apps endpoint. ([50baae52](https://github.com/pixelfed/pixelfed/commit/50baae52)) - ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.11.2 (2022-01-09)](https://github.com/pixelfed/pixelfed/compare/v0.11.1...v0.11.2)