add
This commit is contained in:
@@ -69,13 +69,25 @@ func (h *Handler) Login(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func (h *Handler) Healthz(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method != http.MethodPost {
|
||||
httpx.MethodNotAllowed(w, string(codes.MethodNotAllowed))
|
||||
return
|
||||
}
|
||||
httpx.OK(w, nil)
|
||||
}
|
||||
|
||||
func (h *Handler) Version(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method != http.MethodPost {
|
||||
httpx.MethodNotAllowed(w, string(codes.MethodNotAllowed))
|
||||
return
|
||||
}
|
||||
httpx.OK(w, map[string]string{"version": "user-service v0.1.0"})
|
||||
}
|
||||
|
||||
func (h *Handler) Root(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method != http.MethodPost {
|
||||
httpx.MethodNotAllowed(w, string(codes.MethodNotAllowed))
|
||||
return
|
||||
}
|
||||
httpx.OK(w, map[string]string{"service": "user"})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user