backend: fixed wrong error codes
This commit is contained in:
@@ -40,7 +40,7 @@ func ValidateSubscription(sl validator.StructLevel) {
|
||||
// This is a nested probably user struct. We are only checking if the model exists
|
||||
existingSubscription, err := repositories.GetSubscriptionByName(&subscription.Name)
|
||||
if err != nil || existingSubscription == nil {
|
||||
sl.ReportError(subscription.Name, "Subscription_Name", "name", "exists", "")
|
||||
sl.ReportError(subscription.Name, "subscription.name", "name", "duplicate", "")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user