Skip to content

Commit 96aab77

Browse files
committed
Fixed comment filter bug
1 parent 64eab89 commit 96aab77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

code/services/db-service/src/comments.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func (s *DBServer) ListComments(ctx context.Context, req *dbpb.ListCommentsReque
1616
collection := s.Mongo.Collection("comments")
1717
filter := bson.M{}
1818
if req.GetThreadId() != "" {
19-
filter["thread_id"] = req.GetThreadId()
19+
filter["parent_id"] = req.GetThreadId()
2020
}
2121
cursor, err := collection.Find(ctx, filter, getFindOptions(req.Offset, req.Limit, req.GetSortBy()))
2222
if err != nil {

0 commit comments

Comments
 (0)