mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-12 17:44:31 +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',
|
'sensitive' => 'nullable',
|
||||||
'visibility' => 'string|in:private,unlisted,public',
|
'visibility' => 'string|in:private,unlisted,public',
|
||||||
'spoiler_text' => 'sometimes|max:140',
|
'spoiler_text' => 'sometimes|max:140',
|
||||||
|
'place_id' => 'sometimes|integer|min:1|max:128769'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if(config('costar.enabled') == true) {
|
if(config('costar.enabled') == true) {
|
||||||
|
@ -2566,6 +2567,9 @@ class ApiV1Controller extends Controller
|
||||||
$status->scope = 'draft';
|
$status->scope = 'draft';
|
||||||
$status->is_nsfw = $cw;
|
$status->is_nsfw = $cw;
|
||||||
$status->cw_summary = $spoilerText;
|
$status->cw_summary = $spoilerText;
|
||||||
|
if($request->has('place_id')) {
|
||||||
|
$status->place_id = $request->input('place_id');
|
||||||
|
}
|
||||||
$status->save();
|
$status->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue