From a2f8bf03190cc5c8c92b66a25cdfc2536746b83c Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Sat, 24 Aug 2024 21:08:08 +0200 Subject: [PATCH] Make `CameraWrapper` forward missing calls to the underlying `@camera` instance --- src/gphoto2/web/camera_wrapper.cr | 2 +- src/gphoto2/web/routes.cr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gphoto2/web/camera_wrapper.cr b/src/gphoto2/web/camera_wrapper.cr index b6ace76..ba6bd74 100644 --- a/src/gphoto2/web/camera_wrapper.cr +++ b/src/gphoto2/web/camera_wrapper.cr @@ -12,7 +12,7 @@ module GPhoto2 def initialize(@camera, @timeout : Time::Span = 10.seconds) end - # forward_missing_to :camera + forward_missing_to @camera end end end diff --git a/src/gphoto2/web/routes.cr b/src/gphoto2/web/routes.cr index ec19bfd..4b8968a 100644 --- a/src/gphoto2/web/routes.cr +++ b/src/gphoto2/web/routes.cr @@ -5,7 +5,7 @@ get "/cameras" do |env| GPhoto2::Web.reset_cameras if reload GPhoto2::Web.cameras do |cameras| - send_json env, cameras.map(&.camera) + send_json env, cameras end end