Repository navigation
feat(meet): meeting scheduling polls with Google Meet invites - #377
Merged
Merged
Conversation
Doodle-style polls: public GET/vote routes by code (reCAPTCHA, no login), volunteer.admin routes to create, edit, review and finalize. Finalizing creates the event on the @ohack.org Google Calendar with a Meet link. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
|
||
| @bp.route("/meet/<code>", methods=["GET"]) | ||
| def get_poll(code): | ||
| return _run("get", meet_service.get_public_poll, code) |
|
|
||
| @bp.route("/meet/<code>/votes", methods=["POST"]) | ||
| def submit_vote(code): | ||
| return _run("vote", meet_service.submit_vote, code, request.get_json(silent=True)) |
| @auth.require_user | ||
| @auth.require_org_member_with_permission("volunteer.admin", req_to_org_id=getOrgId) | ||
| def admin_list_polls(): | ||
| return _run("admin list", meet_service.admin_list_polls) |
Comment on lines
+79
to
+80
| return _run("admin create", meet_service.admin_create_poll, | ||
| request.get_json(silent=True), _admin_from_request()) |
| @auth.require_user | ||
| @auth.require_org_member_with_permission("volunteer.admin", req_to_org_id=getOrgId) | ||
| def admin_get_poll(code): | ||
| return _run("admin get", meet_service.admin_get_poll, code) |
Comment on lines
+94
to
+95
| return _run("admin update", meet_service.admin_update_poll, | ||
| code, request.get_json(silent=True)) |
| @auth.require_user | ||
| @auth.require_org_member_with_permission("volunteer.admin", req_to_org_id=getOrgId) | ||
| def admin_delete_poll(code): | ||
| return _run("admin delete", meet_service.admin_delete_poll, code) |
| @auth.require_user | ||
| @auth.require_org_member_with_permission("volunteer.admin", req_to_org_id=getOrgId) | ||
| def admin_delete_vote(code, vote_id): | ||
| return _run("admin delete vote", meet_service.admin_delete_vote, code, vote_id) |
Comment on lines
+116
to
+117
| return _run("admin finalize", meet_service.admin_finalize_poll, | ||
| code, request.get_json(silent=True), _admin_from_request()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Backend for a Doodle-style meeting scheduler (frontend:
/meet?code=and/admin/meet).api/meet/— new blueprint. Collectionsmeet_polls(doc id = code) andmeet_votes.GET /api/meet/<code>(names + answers, never emails or the Meet link),POST /api/meet/<code>/votes(reCAPTCHA; one response per email; edits need theeditTokenreturned on first submit).volunteer.admin: list / create / get / patch / delete polls, delete a response,POST …/finalize.common/utils/google_calendar.py— creates the event on the @ohack.org calendar with a Meet link (sendUpdates=all, so Google emails the invites). Service account with domain-wide delegation; deterministic event id so a retry can't create a second event.sendInvites: falserecords the time only.Needs before invites work
GOOGLE_CALENDAR_SA_CONFIGandGOOGLE_CALENDAR_ORGANIZERare not set on Fly yet (service account needs delegation forhttps://www.googleapis.com/auth/calendar.events). Without them finalize-with-invites returns 503calendar_not_configured; everything else works.Testing
api/meet/tests— 38 tests pass locally (service on MockFirestore, routes with auth stubs incl. 401/403 gates); added to the CI loop.Deploy before the frontend PR.
🤖 Generated with Claude Code