1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-27 02:06:52 +00:00

Update ApiV1Controller, fix apps endpoint

This commit is contained in:
Daniel Supernault 2022-03-23 16:59:18 -06:00
parent 8231eb5ada
commit 50baae5269
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -102,9 +102,7 @@ class ApiV1Controller extends Controller
$this->validate($request, [ $this->validate($request, [
'client_name' => 'required', 'client_name' => 'required',
'redirect_uris' => 'required', 'redirect_uris' => 'required'
'scopes' => 'nullable',
'website' => 'nullable'
]); ]);
$uris = implode(',', explode('\n', $request->redirect_uris)); $uris = implode(',', explode('\n', $request->redirect_uris));
@ -122,11 +120,11 @@ class ApiV1Controller extends Controller
$client->save(); $client->save();
$res = [ $res = [
'id' => $client->id, 'id' => (string) $client->id,
'name' => $client->name, 'name' => $client->name,
'website' => null, 'website' => null,
'redirect_uri' => $client->redirect, 'redirect_uri' => $client->redirect,
'client_id' => $client->id, 'client_id' => (string) $client->id,
'client_secret' => $client->secret, 'client_secret' => $client->secret,
'vapid_key' => null 'vapid_key' => null
]; ];