-
Notifications
You must be signed in to change notification settings - Fork 0
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
Mock endpoints for backend. #30
Conversation
|
||
|
||
@app.route("/<class_id>/invite", methods=["POST"]) | ||
def create_invite(class_id): |
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.
I wonder if we want to generate multiple invite codes, I'm not sure if this method would overwrite previous invite codes, or just generate a new one where other old ones are also valid. I think it's best that only one invite code exists at a time!
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.
It wouldn't. It depends on how we implement it. If you check over the schema for the database, we have it so that multiple invites can be generated for a class, each with their own expiry date. It's kind of like Discord in that regard.
I'd like to get a second opinion on this before we move forward with the one invite code approach, if that's what the team would like.
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.
Yeah let's talk during the team meeting! I'm fine w either tbh so this is fine to keep the code like this
@cindyrzheng We are writing docs to address your concerns! |
* Move class-related endpoints to /class. * Add docs to README.md. Co-authored-by: pkrish20 <preethask@g.ucla.edu> Co-authored-by: svetly-t <svetly-t@users.noreply.github.com>
…ints. Fixed a few typos in main.py.
…ints. Fixed a few typos in main.py.
…w22/Group-A3 into krashanoff/mock-endpoints
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.
The docs look great- super thankful that you guys wrote them up! appreciate it
Sent in some lingering questions about invite code into the groupme but this makes sense if we do discord style invite codes!
lgtm
Squash merged. Discord-style invites can be fleshed out a little more as we discuss. For now just having an expiry is fine. I'll likely add a ticket for an endpoint to invalidate an invite manually. |
This PR is a collaboration with @svetly-t and @pkrish20 to mock up mission-critical endpoints for the backend. They provide no functionality, merely valid requests so that the frontend can accommodate the interface established.
I'm not entirely sure why I can't assign more than a single reviewer and assignee to this ticket, but this PR should be produced in close collaboration with the frontend-oriented devs to create an API that "makes sense".
In addition to mocking endpoints, this PR fixes a type conflict between two of our database schemas.
Endpoints
Nice to have
Closes #14.