add variable system + fix bugs here and there.
This commit is contained in:
@@ -54,6 +54,10 @@ func New(addr string) (lucifer3.Service, error) {
|
||||
bus.RunCommand(*input.ForgetDevice)
|
||||
case input.SearchDevices != nil:
|
||||
bus.RunCommand(*input.SearchDevices)
|
||||
case input.AddAlias != nil:
|
||||
bus.RunCommand(*input.AddAlias)
|
||||
case input.RemoveAlias != nil:
|
||||
bus.RunCommand(*input.RemoveAlias)
|
||||
default:
|
||||
return c.String(400, "No supported command found in input")
|
||||
}
|
||||
@@ -104,6 +108,8 @@ func (s *service) HandleEvent(bus *lucifer3.EventBus, event lucifer3.Event) {
|
||||
|
||||
type commandInput struct {
|
||||
Assign *assignInput `json:"assign,omitempty"`
|
||||
AddAlias *commands.AddAlias `json:"addAlias,omitempty"`
|
||||
RemoveAlias *commands.RemoveAlias `json:"removeAlias,omitempty"`
|
||||
PairDevice *commands.PairDevice `json:"pairDevice,omitempty"`
|
||||
SearchDevices *commands.SearchDevices `json:"searchDevices,omitempty"`
|
||||
ForgetDevice *commands.ForgetDevice `json:"forgetDevice,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user