From c8e1b7f84174faaa5b93456f89a88e64462f26b3 Mon Sep 17 00:00:00 2001 From: Hakan Date: Fri, 30 May 2025 15:44:30 +0200 Subject: [PATCH] feat: Disable Count creation --- pkg/repositories/counter.go | 42 ++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/pkg/repositories/counter.go b/pkg/repositories/counter.go index f10c77c5..da301ec8 100644 --- a/pkg/repositories/counter.go +++ b/pkg/repositories/counter.go @@ -118,13 +118,13 @@ func (r CounterRepository) IncreaseByName(namespace, name string) (models.Counte } // Create Count record - count := models.Count{ - CounterID: counter.ID, - } - - if err = tx.Create(&count).Error; err != nil { - return err - } + //count := models.Count{ + // CounterID: counter.ID, + //} + // + //if err = tx.Create(&count).Error; err != nil { + // return err + //} return nil }) @@ -155,13 +155,13 @@ func (r CounterRepository) DecreaseByName(namespace, name string) (models.Counte } // Create Count record - count := models.Count{ - CounterID: counter.ID, - } - - if err = tx.Create(&count).Error; err != nil { - return err - } + //count := models.Count{ + // CounterID: counter.ID, + //} + // + //if err = tx.Create(&count).Error; err != nil { + // return err + //} return nil }) @@ -187,13 +187,13 @@ func (r CounterRepository) SetByName(namespace, name string, count uint) (models } // Create Count record - count := models.Count{ - CounterID: counter.ID, - } - - if err = tx.Create(&count).Error; err != nil { - return err - } + //count := models.Count{ + // CounterID: counter.ID, + //} + // + //if err = tx.Create(&count).Error; err != nil { + // return err + //} return nil })