mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 23:18:10 +00:00
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:
parent
17e5dfd70e
commit
309450e1b3
2 changed files with 6 additions and 3 deletions
|
|
@ -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([
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue