1
Fork 0

Blacklist from Query instead of ENV

This commit is contained in:
Jan-Lukas Else 2020-04-25 11:44:56 +02:00
parent aa2f030b51
commit 9ed2bed038
1 changed files with 2 additions and 2 deletions

View File

@ -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() {