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:
parent
8231eb5ada
commit
50baae5269
1 changed files with 3 additions and 5 deletions
|
@ -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
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue