Skip to content

Commit 603022f

Browse files
authored
feat: Disable Count creation (#70)
1 parent ee18702 commit 603022f

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

pkg/repositories/counter.go

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,13 @@ func (r CounterRepository) IncreaseByName(namespace, name string) (models.Counte
118118
}
119119

120120
// Create Count record
121-
count := models.Count{
122-
CounterID: counter.ID,
123-
}
124-
125-
if err = tx.Create(&count).Error; err != nil {
126-
return err
127-
}
121+
//count := models.Count{
122+
// CounterID: counter.ID,
123+
//}
124+
//
125+
//if err = tx.Create(&count).Error; err != nil {
126+
// return err
127+
//}
128128

129129
return nil
130130
})
@@ -155,13 +155,13 @@ func (r CounterRepository) DecreaseByName(namespace, name string) (models.Counte
155155
}
156156

157157
// Create Count record
158-
count := models.Count{
159-
CounterID: counter.ID,
160-
}
161-
162-
if err = tx.Create(&count).Error; err != nil {
163-
return err
164-
}
158+
//count := models.Count{
159+
// CounterID: counter.ID,
160+
//}
161+
//
162+
//if err = tx.Create(&count).Error; err != nil {
163+
// return err
164+
//}
165165

166166
return nil
167167
})
@@ -187,13 +187,13 @@ func (r CounterRepository) SetByName(namespace, name string, count uint) (models
187187
}
188188

189189
// Create Count record
190-
count := models.Count{
191-
CounterID: counter.ID,
192-
}
193-
194-
if err = tx.Create(&count).Error; err != nil {
195-
return err
196-
}
190+
//count := models.Count{
191+
// CounterID: counter.ID,
192+
//}
193+
//
194+
//if err = tx.Create(&count).Error; err != nil {
195+
// return err
196+
//}
197197

198198
return nil
199199
})

0 commit comments

Comments
 (0)