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() {
|
func main() {
|
||||||
lastArticleDir, lastArticleDirSet := os.LookupEnv("LAST_ARTICLE_DIR")
|
lastArticleDir, lastArticleDirSet := os.LookupEnv("LAST_ARTICLE_DIR")
|
||||||
blacklistString, _ := os.LookupEnv("BLACKLIST")
|
|
||||||
blacklist := strings.Split(blacklistString, ",")
|
|
||||||
if lastArticleDirSet {
|
if lastArticleDirSet {
|
||||||
http.HandleFunc("/hook", func(w http.ResponseWriter, r *http.Request) {
|
http.HandleFunc("/hook", func(w http.ResponseWriter, r *http.Request) {
|
||||||
if r.Method != http.MethodPost {
|
if r.Method != http.MethodPost {
|
||||||
|
@ -24,6 +22,8 @@ func main() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
blacklist := r.URL.Query()["blacklist"]
|
||||||
|
|
||||||
feeds, feedsPresent := r.URL.Query()["feed"]
|
feeds, feedsPresent := r.URL.Query()["feed"]
|
||||||
if feedsPresent {
|
if feedsPresent {
|
||||||
go func() {
|
go func() {
|
||||||
|
|
Reference in New Issue