diff options
author | Alexander Neonxp Kiryukhin <i@neonxp.ru> | 2024-10-20 20:38:08 +0300 |
---|---|---|
committer | Alexander Neonxp Kiryukhin <i@neonxp.ru> | 2024-10-20 20:38:08 +0300 |
commit | b26bd10926447ed59cbf263aef087bb7c04f35eb (patch) | |
tree | d813a4bcfb6ae04be95966492e9c5d5963f3c90f /pkg/api/api.go | |
parent | d9e19fc53fb386f4160b8c3e9d7c35aa217d9591 (diff) |
Добавил /x/file*
Добавил Dockerfile
Diffstat (limited to 'pkg/api/api.go')
-rw-r--r-- | pkg/api/api.go | 8 |
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, |