From 4b55a71d2378d7cd0d6a548dd44db85eae356b92 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Mon, 13 Jan 2025 21:39:54 -0800 Subject: [PATCH] fix assistant --- {ntfy/assistant => assistant}/assistant.go | 3 +-- main.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) rename {ntfy/assistant => assistant}/assistant.go (83%) diff --git a/ntfy/assistant/assistant.go b/assistant/assistant.go similarity index 83% rename from ntfy/assistant/assistant.go rename to assistant/assistant.go index 3f15647..384c5fc 100644 --- a/ntfy/assistant/assistant.go +++ b/assistant/assistant.go @@ -7,8 +7,7 @@ import ( ) func UnlockDoor(webhook string) error { - req, _ := http.NewRequest("GET", webhook) - res, err := http.DefaultClient.Do(req) + res, err := http.Get(webhook) if err != nil || res.StatusCode/100 != 2 { return fmt.Errorf("got err sending message send req %s %v %s", message, res, err) } diff --git a/main.go b/main.go index b7aea35..08d7e11 100644 --- a/main.go +++ b/main.go @@ -7,9 +7,9 @@ import ( "git.simponic.xyz/simponic/phoneassistant/api" "git.simponic.xyz/simponic/phoneassistant/args" + "git.simponic.xyz/simponic/phoneassistant/assistant" "git.simponic.xyz/simponic/phoneassistant/database" "git.simponic.xyz/simponic/phoneassistant/ntfy" - "git.simponic.xyz/simponic/phoneassistant/ntfy/assistant" "git.simponic.xyz/simponic/phoneassistant/scheduler" "github.com/joho/godotenv" )