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
1 changed files with 3 additions and 5 deletions

View File

@ -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
];