diff --git a/src/app/home/controllers/TileController.php b/src/app/home/controllers/TileController.php index af5ad66298e15d6d16c08ed057bba4ce54f5a897..367093c6fd1a9faefdc229cb0b8c5d81d28d955f 100644 --- a/src/app/home/controllers/TileController.php +++ b/src/app/home/controllers/TileController.php @@ -162,15 +162,13 @@ class TileController } foreach ($body['tiles'] as $key => $tile) { - if ($key != $tile['position']) { - TileModel::update([ - 'set' => [ - 'position' => $key, - ], - 'where' => ['id = ?'], - 'data' => [$tile['id']] - ]); - } + TileModel::update([ + 'set' => [ + 'position' => $tile['position'], + ], + 'where' => ['id = ?'], + 'data' => [$tile['id']] + ]); } return $response->withStatus(204);