summaryrefslogtreecommitdiff
path: root/pkg/api/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/api/api.go')
-rw-r--r--pkg/api/api.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkg/api/api.go b/pkg/api/api.go
index 6bbdd30..fd55f1d 100644
--- a/pkg/api/api.go
+++ b/pkg/api/api.go
@@ -30,15 +30,19 @@ func (a *API) Run(ctx context.Context) error {
mux := http.NewServeMux()
mux.HandleFunc(`GET /list.txt`, a.getListHandler)
- mux.HandleFunc(`GET /blacklist.txt`, a.getBlacklistTxtHandler)
+ mux.HandleFunc(`GET /blacklist.txt`, a.getBlacklistHandler)
mux.HandleFunc(`GET /u/e/{ids...}`, a.getEchosHandler)
mux.HandleFunc(`GET /u/m/{ids...}`, a.getBundleHandler)
- mux.HandleFunc(`GET /u/point/{pauth}/{tmsg}`, a.getPointHandler)
+ mux.HandleFunc(`GET /u/point/{pauth}/{tmsg}`, a.postPointHandler)
mux.HandleFunc(`POST /u/point`, a.postPointHandler)
mux.HandleFunc(`GET /m/{msgID}`, a.getMessageHandler)
mux.HandleFunc(`GET /e/{id}`, a.getEchoHandler)
mux.HandleFunc(`GET /x/features`, a.getFeaturesHandler)
mux.HandleFunc(`GET /x/c/{ids...}`, a.getEchosInfo)
+ mux.HandleFunc(`POST /x/filelist`, a.getFilelistHandler)
+ mux.HandleFunc(`GET /x/filelist/{pauth}`, a.getFilelistHandler)
+ mux.HandleFunc(`POST /x/file`, a.getFileHandler)
+ mux.HandleFunc(`GET /x/file/{filename}`, a.getFileHandler)
srv := http.Server{
Addr: a.config.Listen,