Adds connecting to server

This commit is contained in:
Daniel Svitan
2025-05-08 12:35:21 +02:00
parent 5d0a59dc86
commit b31382fcda
4 changed files with 136 additions and 23 deletions
+3 -3
View File
@@ -37,7 +37,7 @@ var gotifyURL string
var mut sync.Mutex
type WriteReq struct {
opened bool `body:"opened"`
Opened bool `json:"opened"`
}
func main() {
@@ -120,12 +120,12 @@ func main() {
}
mut.Lock()
if data.opened == opened {
if data.Opened == opened {
mut.Unlock()
return c.NoContent(http.StatusOK)
}
opened = data.opened
opened = data.Opened
if locked && alert {
var action string
if opened {