diff --git a/docs/openapi.yaml b/docs/openapi.yaml index fdf71b4..1912d35 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -94,6 +94,9 @@ paths: type: string accepted: type: boolean + taxnumber: + type: string + description: ИНН пользователя responses: "200": description: успешное подтверждение или отклонение верификации diff --git a/internal/controllers/verification.go b/internal/controllers/verification.go index 1e4591b..4cdd17f 100644 --- a/internal/controllers/verification.go +++ b/internal/controllers/verification.go @@ -26,7 +26,7 @@ func (r *VerificationController) GetRoutes() []Route { {"GET", "/verification/:userID", "GetVerification", r.GetVerification}, {"POST", "/verification", "CreateVerification", r.CreateVerification}, {"PATCH", "/verification", "SetVerificationStatus", r.SetVerificationStatus}, - {Method: "PATCH", Path: "/verification/file", Name: "SetVerificationFile", Handler: r.SetVerificationFile}, + {"PATCH", "/verification/file", "SetVerificationFile", r.SetVerificationFile}, } } diff --git a/internal/models/requests.go b/internal/models/requests.go index 7227d6a..6ce4fe1 100644 --- a/internal/models/requests.go +++ b/internal/models/requests.go @@ -5,8 +5,9 @@ type ReqCreateVerification struct { } type ReqSetVerification struct { - ID string `json:"id"` - Status string `json:"status"` - Comment string `json:"comment"` - Accepted bool `json:"accepted"` + ID string `json:"id"` + Status string `json:"status"` + Comment string `json:"comment"` + Accepted bool `json:"accepted"` + TaxNumber string `json:"taxnumber"` } diff --git a/internal/models/verification.go b/internal/models/verification.go index 1fe1a8c..d6e6774 100644 --- a/internal/models/verification.go +++ b/internal/models/verification.go @@ -10,6 +10,7 @@ type Verification struct { UpdatedAt time.Time `json:"updated_at" bson:"updated_at"` Comment string `json:"comment" bson:"comment,omitempty"` Files []VerificationFile `json:"files" bson:"files,omitempty"` + TaxNumber string `json:"taxnumber" bson:"taxnumber,omitempty"` } type VerificationFile struct {