We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e9fae96 commit 73005c2Copy full SHA for 73005c2
1 file changed
app/events/repository/list_registration_by_event.go
@@ -8,7 +8,7 @@ import (
8
)
9
10
func (repo *repository) ListRegistrationByEvent(ctx context.Context, eventID uint, filterPagination domain.FilterPagination) (data []domain.RegistrationEvent, totalCount int64, err error) {
11
- if err := repo.db.DB(ctx).Model(&domain.RegistrationEvent{}).Count(&totalCount).Error; err != nil {
+ if err := repo.db.DB(ctx).Model(&domain.RegistrationEvent{}).Where("event_id = ?", eventID).Count(&totalCount).Error; err != nil {
12
logrus.Error("failed to count blog posts: ", err)
13
return nil, 0, err
14
}
0 commit comments