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

New service: get best answer #874

Closed
smadbe opened this issue Jan 17, 2023 · 0 comments · Fixed by #880
Closed

New service: get best answer #874

smadbe opened this issue Jan 17, 2023 · 0 comments · Fixed by #880
Assignees

Comments

@smadbe
Copy link
Contributor

smadbe commented Jan 17, 2023

Overview

On GET /items/{item_id}/best-answer

Return the best answer of the user on the given item (among all attempts). The best answer is defined as the one which gives the highest score, if there are several ones, the last (by created_at) one.

Without watched_group_id, it applies to the current-user. With it, it returns for the one for the watched participant.

Input

  • item_id
  • watched_group_id (optional)

Output

same as currentAnswerGet

Validations

  • if watched_group_id is given, the current user must be allowed to watch "answer" of the item identified by item_id
  • if watched_group_id is given, it must be a participant (= team or user)
  • if watched_group_id is given, the current user must be allowed to watch the participant
@smadbe smadbe added Definition in Progress Issue definition not completed and removed Definition in Progress Issue definition not completed labels Jan 17, 2023
This was referenced Jan 23, 2023
@GeoffreyHuck GeoffreyHuck linked a pull request Jan 23, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants