mirror of
https://github.com/flarum/framework.git
synced 2025-03-02 09:51:54 +08:00
Fix ordering bug
If an empty request is sent to the /tags/order endpoint, all tags would get moved to secondary tags.
This commit is contained in:
parent
8d74b40e49
commit
0f75139a51
@ -30,6 +30,10 @@ class OrderTagsController implements ControllerInterface
|
|||||||
|
|
||||||
$order = array_get($request->getParsedBody(), 'order');
|
$order = array_get($request->getParsedBody(), 'order');
|
||||||
|
|
||||||
|
if ($order === null) {
|
||||||
|
return new EmptyResponse(422);
|
||||||
|
}
|
||||||
|
|
||||||
Tag::query()->update([
|
Tag::query()->update([
|
||||||
'position' => null,
|
'position' => null,
|
||||||
'parent_id' => null
|
'parent_id' => null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user