summary refs log tree commit diff stats
path: root/handlers.go
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-05-20 22:52:50 -0400
committerBen Morrison <ben@gbmor.dev>2019-05-21 03:42:17 -0400
commitdf1d1efa19aed5bc6553c7c0a0b4b7dfe20e3bd0 (patch)
tree2a60f30829b8d1fca943aa3ca4a077cb4cb3517d /handlers.go
parenta3c67f1ff9ed2cff44930f6bfd17a3ec272fe2f5 (diff)
downloadgetwtxt-df1d1efa19aed5bc6553c7c0a0b4b7dfe20e3bd0.tar.gz
fleshed out POST handler, added remote registry list
Diffstat (limited to 'handlers.go')
-rw-r--r--handlers.go15
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"