diff options
author | Alexander Neonxp Kiryukhin <i@neonxp.ru> | 2024-10-29 01:21:05 +0300 |
---|---|---|
committer | Alexander Neonxp Kiryukhin <i@neonxp.ru> | 2024-10-29 01:21:05 +0300 |
commit | fd4e0c3112d69061d495dfcf79f6ef62e3c6d5e6 (patch) | |
tree | fa55d6e879e3c6d85601d5c2486837f323ffd81d /pkg/api/list.go | |
parent | b26bd10926447ed59cbf263aef087bb7c04f35eb (diff) |
Diffstat (limited to 'pkg/api/list.go')
-rw-r--r-- | pkg/api/list.go | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/pkg/api/list.go b/pkg/api/list.go deleted file mode 100644 index 80a34ea..0000000 --- a/pkg/api/list.go +++ /dev/null @@ -1,29 +0,0 @@ -package api - -import ( - "fmt" - "net/http" - "strings" -) - -func (a *API) getListHandler(w http.ResponseWriter, r *http.Request) { - echos, err := a.idec.GetEchos() - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } - - for _, e := range echos { - fmt.Fprintf(w, "%s:%d:%s\n", e.Name, e.Count, e.Description) - } -} - -func (a *API) getBlacklistHandler(w http.ResponseWriter, r *http.Request) { - list, err := a.idec.GetBlacklist() - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } - - fmt.Fprint(w, strings.Join(list, "\n")) -} |