diff --git a/api/src/main/kotlin/nebulosa/api/lightboxes/LightBoxDeserializer.kt b/api/src/main/kotlin/nebulosa/api/lightboxes/LightBoxDeserializer.kt new file mode 100644 index 000000000..b5fd818c5 --- /dev/null +++ b/api/src/main/kotlin/nebulosa/api/lightboxes/LightBoxDeserializer.kt @@ -0,0 +1,16 @@ +package nebulosa.api.lightboxes + +import nebulosa.api.connection.ConnectionService +import nebulosa.api.devices.DeviceDeserializer +import nebulosa.indi.device.lightbox.LightBox +import org.springframework.beans.factory.annotation.Autowired +import org.springframework.context.annotation.Lazy +import org.springframework.stereotype.Component + +@Component +class LightBoxDeserializer : DeviceDeserializer(LightBox::class.java) { + + @Autowired @Lazy private lateinit var connectionService: ConnectionService + + override fun deviceFor(name: String) = connectionService.lightBox(name) +}