This commit is contained in:
vipg
2026-02-09 16:45:40 +08:00
parent 875feb37a5
commit 6640f09639

View File

@@ -73,7 +73,7 @@ func routes() http.Handler {
writeJSON(w, http.StatusOK, true, "ok", map[string]string{"version": "user-service v0.1.0"}) writeJSON(w, http.StatusOK, true, "ok", map[string]string{"version": "user-service v0.1.0"})
}) })
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "hello from user-service") writeJSON(w, http.StatusOK, true, "ok", map[string]string{"service": "user"})
}) })
mux.HandleFunc("/register", registerHandler) mux.HandleFunc("/register", registerHandler)
mux.HandleFunc("/login", loginHandler) mux.HandleFunc("/login", loginHandler)