diff --git a/internal/service/handlers/verify_passport.go b/internal/service/handlers/verify_passport.go index aa10b4f..13dbbc4 100644 --- a/internal/service/handlers/verify_passport.go +++ b/internal/service/handlers/verify_passport.go @@ -15,6 +15,12 @@ import ( ) func VerifyPassport(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusNoContent) + return + + // TODO: New logic. User go to public endpoint with proof that verify passport + // need logic for check proof and accruing points for verification. + req, err := requests.NewVerifyPassport(r) if err != nil { Log(r).WithError(err).Debug("Bad request") diff --git a/internal/service/router.go b/internal/service/router.go index 887ac42..0ecff25 100644 --- a/internal/service/router.go +++ b/internal/service/router.go @@ -31,6 +31,7 @@ func Run(ctx context.Context, cfg config.Config) { r.Route("/{did}", func(r chi.Router) { r.Get("/", handlers.GetBalance) r.Patch("/", handlers.ActivateBalance) + r.Patch("/verifypassport", handlers.VerifyPassport) r.Get("/withdrawals", handlers.ListWithdrawals) r.Post("/withdrawals", handlers.Withdraw) }) @@ -46,7 +47,6 @@ func Run(ctx context.Context, cfg config.Config) { }) // must be accessible only within the cluster r.Route("/private", func(r chi.Router) { - r.Patch("/balances", handlers.VerifyPassport) r.Patch("/events", handlers.FulfillEvent) r.Patch("/proofs", handlers.FulfillVerifyProofEvent) r.Post("/referrals", handlers.EditReferrals) diff --git a/pkg/connector/main.go b/pkg/connector/main.go index de4c31d..ae51ead 100644 --- a/pkg/connector/main.go +++ b/pkg/connector/main.go @@ -81,6 +81,8 @@ func (c *Client) FulfillVerifyProofEvent(ctx context.Context, req FulfillVerifyP } func (c *Client) VerifyPassport(ctx context.Context, req VerifyPassportRequest) error { + // Deprecated: VerifyPassport whould be public endpoint + // and that connector currently not used if c.disabled { c.log.Info("Points connector disabled") return nil