-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/tdbytes #96
Feature/tdbytes #96
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Will assume all tests pass without testing myself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, and nice that you added tests 🙌 I left one comment on wether or not a user suggestion should be capped but that is not very plausible that users spam their suggestions
app/api/kiosk.py
Outdated
if member is None: | ||
raise HTTPException(500) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe 404 here, not really an internal server error IMO
|
||
class KioskSuggestion(KioskSuggestionPayload): | ||
id: str | ||
member: Member |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a question, do we need to know the member adding a suggestion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a requirement, and only admins are allowed to view this data as it can be sensitive. However, I thought it was a nice utility if admins want to ask a person what they mean by certain suggestions, or hold users accountable for spamming or other abuse.
|
||
|
||
@router.post("/suggestion") | ||
def add_suggestion( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not relevant now, but we should maybe look to guard against users spamming suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, many endpoints could use some rate limiting mechanism
b3af291
to
8edad90
Compare
💎 tdBytes pages and kiosk admin role
Added endpoints for kiosk product suggestions
Also added a new kiosk admin role to allow non-admins to view suggestions
🐳 removed obsolete version tags from docker compose files