Backend: add Subscription CRUD

This commit is contained in:
Alex
2025-02-12 20:30:59 +01:00
parent 8787c8c2c1
commit 743493517b
8 changed files with 345 additions and 21 deletions

View File

@@ -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", "")
}