backend errors typo
This commit is contained in:
@@ -2,36 +2,6 @@ package errors
|
||||
|
||||
import "errors"
|
||||
|
||||
type ValidationKeys struct {
|
||||
Invalid string
|
||||
InternalServerError string
|
||||
InvalidJson string
|
||||
Unauthorized string
|
||||
InvalidSubscriptionModel string
|
||||
UserNotFoundWrongPassword string
|
||||
JwtGenerationFailed string
|
||||
Duplicate string
|
||||
InvalidUserID string
|
||||
PasswordAlreadyChanged string
|
||||
UserDisabled string
|
||||
NoAuthToken string
|
||||
NotFound string
|
||||
InUse string
|
||||
UndeliveredVerificationMail string
|
||||
UserAlreadyVerified string
|
||||
}
|
||||
|
||||
type ValidationFields struct {
|
||||
General string
|
||||
ParentMemberShipID string
|
||||
SubscriptionModel string
|
||||
Login string
|
||||
Email string
|
||||
User string
|
||||
Licences string
|
||||
Verification string
|
||||
}
|
||||
|
||||
var (
|
||||
ErrNotFound = errors.New("not found")
|
||||
ErrUserNotFound = errors.New("user not found")
|
||||
@@ -56,6 +26,37 @@ var (
|
||||
ErrInvalidSubscriptionData = errors.New("Provided subscription data is invalid. Immutable fields where changed.")
|
||||
)
|
||||
|
||||
type ValidationKeys struct {
|
||||
Invalid string
|
||||
InternalServerError string
|
||||
InvalidJSON string
|
||||
InvalidUserID string
|
||||
InvalidSubscriptionModel string
|
||||
Unauthorized string
|
||||
UserNotFoundWrongPassword string
|
||||
JwtGenerationFailed string
|
||||
Duplicate string
|
||||
UserDisabled string
|
||||
PasswordAlreadyChanged string
|
||||
NoAuthToken string
|
||||
NotFound string
|
||||
InUse string
|
||||
UndeliveredVerificationMail string
|
||||
UserAlreadyVerified string
|
||||
}
|
||||
|
||||
type ValidationFields struct {
|
||||
General string
|
||||
ParentMembershipID string
|
||||
SubscriptionModel string
|
||||
Login string
|
||||
Email string
|
||||
User string
|
||||
Licences string
|
||||
Verification string
|
||||
Car string
|
||||
}
|
||||
|
||||
var Responses = struct {
|
||||
Keys ValidationKeys
|
||||
Fields ValidationFields
|
||||
@@ -63,7 +64,9 @@ var Responses = struct {
|
||||
Keys: ValidationKeys{
|
||||
Invalid: "server.validation.invalid",
|
||||
InternalServerError: "server.error.internal_server_error",
|
||||
InvalidJson: "server.error.invalid_json",
|
||||
InvalidJSON: "server.error.invalid_json",
|
||||
InvalidUserID: "server.validation.invalid_user_id",
|
||||
InvalidSubscriptionModel: "server.validation.invalid_subscription_model",
|
||||
Unauthorized: "server.error.unauthorized",
|
||||
UserNotFoundWrongPassword: "server.validation.user_not_found_or_wrong_password",
|
||||
JwtGenerationFailed: "server.error.jwt_generation_failed",
|
||||
@@ -78,13 +81,14 @@ var Responses = struct {
|
||||
},
|
||||
Fields: ValidationFields{
|
||||
General: "server.general",
|
||||
ParentMemberShipID: "parent_membership_id",
|
||||
ParentMembershipID: "parent_membership_id",
|
||||
SubscriptionModel: "subscription_model",
|
||||
Login: "user.login",
|
||||
Email: "user.email",
|
||||
User: "user.user",
|
||||
Licences: "licence",
|
||||
Verification: "verification",
|
||||
Car: "car",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user