mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-29 16:00:45 +00:00
Update ApiController
This commit is contained in:
parent
7392c9d0bc
commit
64e4c002e9
1 changed files with 4 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue