feat ScreenGeneratorCommand, fix render endpoint

* feat: signature var `view` added to ScreenGeneratorCommand
* fix: /display endpoint responds current screen image from db
This commit is contained in:
Benjamin Nussbaum 2025-02-13 13:06:04 +01:00
parent 17e5dfd70e
commit 309450e1b3
2 changed files with 6 additions and 3 deletions

View file

@ -24,7 +24,9 @@ Route::get('/display', function (Request $request) {
'last_firmware_version' => $request->header('fw-version'),
]);
$image_path = collect(\Storage::disk('public')->files('/images/generated'))->first(fn ($file) => \Str::endsWith($file, '.bmp'));
$image_uuid = $device->current_screen_image;
$image_path = 'images/generated/'.$image_uuid.'.bmp';
$filename = basename($image_path);
return response()->json([