summaryrefslogtreecommitdiff
path: root/ntfy/assistant/assistant.go
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth@simponic.xyz>2025-01-13 21:39:54 -0800
committerElizabeth Hunt <elizabeth@simponic.xyz>2025-01-13 21:44:43 -0800
commitbf5b86e9b87b77de6905870cc61e0d988e18879b (patch)
tree6298cccd9d3fda27427edd35b67cc64de4542378 /ntfy/assistant/assistant.go
parentfb7349b69d77557aceb189efbc26497d7470d641 (diff)
downloadphoneassistant-bf5b86e9b87b77de6905870cc61e0d988e18879b.tar.gz
phoneassistant-bf5b86e9b87b77de6905870cc61e0d988e18879b.zip
fix assistant
Diffstat (limited to 'ntfy/assistant/assistant.go')
-rw-r--r--ntfy/assistant/assistant.go23
1 files changed, 0 insertions, 23 deletions
diff --git a/ntfy/assistant/assistant.go b/ntfy/assistant/assistant.go
deleted file mode 100644
index 3f15647..0000000
--- a/ntfy/assistant/assistant.go
+++ /dev/null
@@ -1,23 +0,0 @@
-package assistant
-
-import (
- "fmt"
- "net/http"
- "os"
-)
-
-func UnlockDoor(webhook string) error {
- req, _ := http.NewRequest("GET", webhook)
- res, err := http.DefaultClient.Do(req)
- if err != nil || res.StatusCode/100 != 2 {
- return fmt.Errorf("got err sending message send req %s %v %s", message, res, err)
- }
- return nil
-}
-
-func Do(command string) error {
- if command == "unlock" {
- return UnlockDoor(os.Getenv("UNLOCK_DOOR_WEBHOOK"))
- }
- return fmt.Errorf("unknown command %s", command)
-}