diff --git a/backend_v1/app/services/posts.go b/backend_v1/app/services/posts.go index 45b898b..3431be4 100644 --- a/backend_v1/app/services/posts.go +++ b/backend_v1/app/services/posts.go @@ -115,6 +115,8 @@ func (m *posts) Bought(ctx context.Context, userId int64, pagination *requests.P RightJoin(tblUserPost, tbl.ID.EqCol(tblUserPost.PostID)). Where(tblUserPost.UserID.Eq(userId)). Order(tblUserPost.CreatedAt.Desc()). + Limit(int(pagination.Limit)). + Offset(int(pagination.Offset())). Scan(&retItems) if err != nil { return nil, err