Skip to content

Commit 93abdc7

Browse files
authored
Merge pull request #28 from hammercode-dev/BE-16/adjust-get-list-event-by-user
Be 16/adjust get list event by user
2 parents 50a5cba + ad5ac0b commit 93abdc7

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

app/events/repository/list_registration.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ func (repo *repository) ListRegistration(ctx context.Context, filter domain.Even
2929
db = db.Where("registration_events.created_at <= ?", filter.EndDate)
3030
}
3131

32-
if email != "" {
33-
db = db.Where("registration_events.email = ?", email)
34-
}
35-
3632
var totalData int64
3733
db.Count(&totalData)
3834

domain/event.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ type EventDTO struct {
175175
Capacity int `json:"capacity"`
176176
RegistrationLink string `json:"registration_link"`
177177
SessionType string `json:"session_type"`
178+
Status string `json:"status"`
178179
}
179180

180181
type UpdateEvenPayload struct {
@@ -284,6 +285,7 @@ func (e Event) ToDTO() EventDTO {
284285
ImageEvent: e.Image,
285286
DateEvent: e.Date,
286287
Type: e.Type,
288+
Status: e.Status,
287289
Location: e.Location,
288290
Duration: e.Duration,
289291
Capacity: e.Capacity,

0 commit comments

Comments
 (0)