diff --git a/internal/auth.go b/internal/auth.go index af94de6..a7f0847 100644 --- a/internal/auth.go +++ b/internal/auth.go @@ -29,6 +29,7 @@ func NewServer(ctx context.Context, config *config.Config) *AuthServer { } // + s.Router.Get("/api/v1/ready", ready(s)) s.Router.Post("/api/v1/login", login(s)) s.Router.Post("/api/v1/registration", registration(s)) s.Router.Post("/api/v1/confirmation", confirmation(s)) @@ -40,6 +41,12 @@ func (s *AuthServer) GracefulStop() error { return s.db.Close() } +func ready(s *AuthServer) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + w.Write([]byte("ok")) + } +} + func login(s *AuthServer) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { uid := r.FormValue("uid")