Blacklist from Query instead of ENV
This commit is contained in:
parent
aa2f030b51
commit
9ed2bed038
4
main.go
4
main.go
|
@ -15,8 +15,6 @@ import (
|
|||
|
||||
func main() {
|
||||
lastArticleDir, lastArticleDirSet := os.LookupEnv("LAST_ARTICLE_DIR")
|
||||
blacklistString, _ := os.LookupEnv("BLACKLIST")
|
||||
blacklist := strings.Split(blacklistString, ",")
|
||||
if lastArticleDirSet {
|
||||
http.HandleFunc("/hook", func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method != http.MethodPost {
|
||||
|
@ -24,6 +22,8 @@ func main() {
|
|||
return
|
||||
}
|
||||
|
||||
blacklist := r.URL.Query()["blacklist"]
|
||||
|
||||
feeds, feedsPresent := r.URL.Query()["feed"]
|
||||
if feedsPresent {
|
||||
go func() {
|
||||
|
|
Reference in New Issue