Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding code for retrieving praise data for feedback #89

Closed

Conversation

AndrewHUNGNguyen
Copy link
Contributor

What does the PR do?

Adds an API to retrieve praise data written about a user of slack_user_id.
NOTE: Please do not merge this PR yet. I submitted this PR with the intent of feedback on work so far.

Type of change

  • [X ] New Feature

Make sure you have

  • Pulled from the default branch
  • Documented your changes
  • Linked the Issue
  • Appointed a reviewer (if any)

@AndrewHUNGNguyen AndrewHUNGNguyen marked this pull request as draft September 26, 2024 16:55
praise_list.append(doc_json)

# return the praise_list sorted in descending order by timestamp
return sorted(praise_list, key=lambda x: x["timestamp"], reverse=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally you want to rely on the database to sort since it's usually faster than doing it in code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants