mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-09 13:50:44 +00:00
commit
18c95136fd
1 changed files with 6 additions and 3 deletions
|
@ -137,7 +137,10 @@ class ApiV1Controller extends Controller
|
||||||
'redirect_uris' => 'required',
|
'redirect_uris' => 'required',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$uris = implode(',', explode('\n', $request->redirect_uris));
|
$uris = collect(explode("\n", $request->redirect_uris))
|
||||||
|
->map('urldecode')
|
||||||
|
->filter()
|
||||||
|
->join(',');
|
||||||
|
|
||||||
$client = Passport::client()->forceFill([
|
$client = Passport::client()->forceFill([
|
||||||
'user_id' => null,
|
'user_id' => null,
|
||||||
|
@ -3494,7 +3497,7 @@ class ApiV1Controller extends Controller
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$defaultCaption = "";
|
$defaultCaption = '';
|
||||||
$content = $request->filled('status') ? strip_tags($request->input('status')) : $defaultCaption;
|
$content = $request->filled('status') ? strip_tags($request->input('status')) : $defaultCaption;
|
||||||
$cw = $user->profile->cw == true ? true : $request->boolean('sensitive', false);
|
$cw = $user->profile->cw == true ? true : $request->boolean('sensitive', false);
|
||||||
$spoilerText = $cw && $request->filled('spoiler_text') ? $request->input('spoiler_text') : null;
|
$spoilerText = $cw && $request->filled('spoiler_text') ? $request->input('spoiler_text') : null;
|
||||||
|
@ -3687,7 +3690,7 @@ class ApiV1Controller extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$defaultCaption = config_cache('database.default') === 'mysql' ? null : "";
|
$defaultCaption = config_cache('database.default') === 'mysql' ? null : '';
|
||||||
$share = Status::firstOrCreate([
|
$share = Status::firstOrCreate([
|
||||||
'caption' => $defaultCaption,
|
'caption' => $defaultCaption,
|
||||||
'rendered' => $defaultCaption,
|
'rendered' => $defaultCaption,
|
||||||
|
|
Loading…
Reference in a new issue