Skip to content

Commit 895708d

Browse files
add completed_at field to club reading completion
1 parent fedbe01 commit 895708d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

internal/models/reading.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,5 @@ type ClubAssignmentResponse struct {
122122
Status string `json:"status"`
123123
StartDate *time.Time `json:"start_date,omitempty"`
124124
DueDate *time.Time `json:"due_date,omitempty"`
125+
CompletedAt *time.Time `json:"completed_at,omitempty"`
125126
}

internal/services/reading.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ func (s *ReadingService) CompleteClubAssignment(clubID uint) (*models.ClubAssign
300300
book, _ := s.bookRepo.GetByID(a.BookID)
301301
resp := &models.ClubAssignmentResponse{
302302
ID: a.ID, ClubID: a.ClubID, Book: *book, Status: string(a.Status),
303-
StartDate: a.StartDate, DueDate: a.DueDate,
303+
StartDate: a.StartDate, DueDate: a.DueDate, CompletedAt: a.CompletedAt,
304304
}
305305

306306
if club, cerr := s.clubRepo.GetByID(clubID); cerr == nil {

0 commit comments

Comments
 (0)