Backend: add Subscription CRUD
This commit is contained in:
@@ -38,7 +38,7 @@ func ValidateSubscription(sl validator.StructLevel) {
|
||||
}
|
||||
} else {
|
||||
// This is a nested probably user struct. We are only checking if the model exists
|
||||
existingSubscription, err := repositories.GetModelByName(&subscription.Name)
|
||||
existingSubscription, err := repositories.GetSubscriptionByName(&subscription.Name)
|
||||
if err != nil || existingSubscription == nil {
|
||||
sl.ReportError(subscription.Name, "Subscription_Name", "name", "exists", "")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user