mirror of
https://framagit.org/fredix/drone-gotify
synced 2026-01-23 02:14:06 +00:00
some fix
This commit is contained in:
parent
9ed74ef1f7
commit
44158debc4
1 changed files with 0 additions and 24 deletions
|
|
@ -1,24 +0,0 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"log"
|
||||
)
|
||||
|
||||
func main() {
|
||||
token := os.Getenv("PLUGIN_GOTIFYTOKEN")
|
||||
endpoint := os.Getenv("PLUGIN_GOTIFYENDPOINT")
|
||||
title := os.Getenv("PLUGIN_GOTIFYTITLE")
|
||||
message := os.Getenv("message")
|
||||
priority := os.Getenv("PLUGIN_GOTIFYPRIORITY")
|
||||
|
||||
resp, err := http.PostForm(endpoint + "/message?token=" + token, url.Values{"message": {message}, "title": {title}, "priority": {priority}})
|
||||
if resp != nil {
|
||||
resp.Body.Close()
|
||||
}
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue