This commit is contained in:
parent
bf5b86e9b8
commit
8380ef2db1
@ -2,6 +2,7 @@ package assistant
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
@ -15,6 +16,7 @@ func UnlockDoor(webhook string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Do(command string) error {
|
func Do(command string) error {
|
||||||
|
log.Println("handling coomand", command)
|
||||||
if command == "unlock" {
|
if command == "unlock" {
|
||||||
return UnlockDoor(os.Getenv("UNLOCK_DOOR_WEBHOOK"))
|
return UnlockDoor(os.Getenv("UNLOCK_DOOR_WEBHOOK"))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user