fix: update_firmware flag is only returned once to avoid upgrade loop

chore: fix code style
This commit is contained in:
Benjamin Nussbaum 2025-03-30 10:19:15 +02:00
parent 5367fc8a64
commit 6e5e4cd633
4 changed files with 59 additions and 1 deletions

View file

@ -71,6 +71,14 @@ class Device extends Model
return null;
}
public function resetUpdateFirmwareFlag(): void
{
if ($this->proxy_cloud_response) {
$this->proxy_cloud_response = array_merge($this->proxy_cloud_response, ['update_firmware' => false]);
$this->save();
}
}
public function playlists(): HasMany
{
return $this->hasMany(Playlist::class);