diff options
author | Ben Morrison <ben@gbmor.dev> | 2019-05-20 22:52:50 -0400 |
---|---|---|
committer | Ben Morrison <ben@gbmor.dev> | 2019-05-21 03:42:17 -0400 |
commit | df1d1efa19aed5bc6553c7c0a0b4b7dfe20e3bd0 (patch) | |
tree | 2a60f30829b8d1fca943aa3ca4a077cb4cb3517d /handlers.go | |
parent | a3c67f1ff9ed2cff44930f6bfd17a3ec272fe2f5 (diff) | |
download | getwtxt-df1d1efa19aed5bc6553c7c0a0b4b7dfe20e3bd0.tar.gz |
fleshed out POST handler, added remote registry list
Diffstat (limited to 'handlers.go')
-rw-r--r-- | handlers.go | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/handlers.go b/handlers.go index 4085f73..4ec511d 100644 --- a/handlers.go +++ b/handlers.go @@ -100,20 +100,7 @@ func apiEndpointHandler(w http.ResponseWriter, r *http.Request) { // handles POST for "/api/plain/users" func apiEndpointPOSTHandler(w http.ResponseWriter, r *http.Request) { - - vars := mux.Vars(r) - format := vars["format"] - endpoint := vars["endpoint"] - - w.Header().Set("Content-Type", htmlutf8) - - _, err := w.Write([]byte(format + "/" + endpoint)) - if err != nil { - log500(w, r, err) - return - } - - log200(r) + apiPostUser(w, r) } // handles "/api/plain/tags" |