Skip to content

Commit bb986c3

Browse files
Adam BaloghAdam Balogh
authored andcommitted
rank
1 parent 550c607 commit bb986c3

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

server/activity_tracker.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,22 +121,13 @@ def get_activity_stats(self, user_address: str) -> ActivityStats:
121121
if last_message_date != today:
122122
daily_message_count = 0
123123

124-
# Get the user's rank by counting users with more points
125-
rank_response = self.table.query(
126-
IndexName="points-index", # This GSI needs to be created in DynamoDB
127-
KeyConditionExpression="points > :points",
128-
ExpressionAttributeValues={":points": points},
129-
Select="COUNT"
130-
)
131-
rank = rank_response.get("Count", 0) + 1 # Add 1 since rank is 1-based
132-
133124
return ActivityStats(
134125
message_count=message_count,
135126
successful_invites=successful_invites,
136127
points=points,
137128
daily_message_count=daily_message_count,
138129
daily_message_limit=PointsConfig.DAILY_MESSAGE_LIMIT,
139-
rank=rank
130+
rank=-1
140131
)
141132
except Exception:
142133
return ActivityStats(

0 commit comments

Comments
 (0)