mirror of
https://github.com/flarum/framework.git
synced 2024-11-29 21:11:55 +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');
|
||||
|
||||
if ($order === null) {
|
||||
return new EmptyResponse(422);
|
||||
}
|
||||
|
||||
Tag::query()->update([
|
||||
'position' => null,
|
||||
'parent_id' => null
|
||||
|
|
Loading…
Reference in New Issue
Block a user