mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Update ApiV1Controller, add optional place_id parameter to POST /api/v1/statuses endpoint
This commit is contained in:
parent
79976a3f81
commit
ef0d1f84ae
1 changed files with 4 additions and 0 deletions
|
@ -2477,6 +2477,7 @@ class ApiV1Controller extends Controller
|
|||
'sensitive' => 'nullable',
|
||||
'visibility' => 'string|in:private,unlisted,public',
|
||||
'spoiler_text' => 'sometimes|max:140',
|
||||
'place_id' => 'sometimes|integer|min:1|max:128769'
|
||||
]);
|
||||
|
||||
if(config('costar.enabled') == true) {
|
||||
|
@ -2566,6 +2567,9 @@ class ApiV1Controller extends Controller
|
|||
$status->scope = 'draft';
|
||||
$status->is_nsfw = $cw;
|
||||
$status->cw_summary = $spoilerText;
|
||||
if($request->has('place_id')) {
|
||||
$status->place_id = $request->input('place_id');
|
||||
}
|
||||
$status->save();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue