Skip to content

Commit

Permalink
order reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
Qaleka committed Dec 21, 2024
1 parent a103a13 commit dd8c859
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/reviews/repository/reviews_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (r *ReviewRepository) GetUserReviews(ctx context.Context, userId string) ([
Select("reviews.*, users.avatar as \"UserAvatar\", users.name as \"UserName\"").
Joins("JOIN users ON reviews.\"userId\" = users.uuid").
Where("reviews.\"hostId\" = ?", userId).
Order("reviews.\"createdAt\" ASC").
Order("reviews.\"createdAt\" DESC").
Find(&reviews).Error; err != nil {
if errors.Is(err, gorm.ErrRecordNotFound) {
logger.DBLogger.Warn("No reviews found", zap.String("request_id", requestID), zap.String("userID", userId))
Expand Down

0 comments on commit dd8c859

Please sign in to comment.