Skip to content

Commit

Permalink
fix: specify model of db request in functions respondents/GetMyRespon…
Browse files Browse the repository at this point in the history
…seIDs and targets/IsTargetingMe
  • Loading branch information
Eraxyso authored Sep 2, 2024
1 parent 1878011 commit 7cba992
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions model/respondents_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ func (*Respondent) GetMyResponseIDs(ctx context.Context, userID string) ([]int,

responsesID := []int{}
err = db.
Model(&Respondents{}).
Where("user_traqid = ?", userID).
Select("response_id").
Find(&responsesID).Error
Expand Down
1 change: 1 addition & 0 deletions model/targets_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ func (*Target) IsTargetingMe(ctx context.Context, questionnairID int, userID str

var count int64
err = db.
Model(&Targets{}).
Where("questionnaire_id = ? AND user_traqid = ?", questionnairID, userID).
Count(&count).Error
if err != nil {
Expand Down

0 comments on commit 7cba992

Please sign in to comment.