mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-14 15:37:53 +00:00
fix: update_firmware flag is only returned once to avoid upgrade loop
chore: fix code style
This commit is contained in:
parent
5367fc8a64
commit
6e5e4cd633
4 changed files with 59 additions and 1 deletions
|
|
@ -92,6 +92,11 @@ Route::get('/display', function (Request $request) {
|
|||
$response['image_url_timeout'] = config('services.trmnl.image_url_timeout');
|
||||
}
|
||||
|
||||
// If update_firmware is true, reset it after returning it, to avoid upgrade loop
|
||||
if ($device->update_firmware) {
|
||||
$device->resetUpdateFirmwareFlag();
|
||||
}
|
||||
|
||||
return response()->json($response);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue