[Teams] Add demo_video_url field + hacker self-serve endpoint#217
Merged
Conversation
Adds a per-team `demo_video_url` (string) so each team can attach a single demo video link (YouTube / Vimeo / Loom / Google Drive) that the event and results pages render in the team card. Mirrors the existing `devpost_link` shape, including a companion `demo_video_url_submitted` ISO timestamp stamped on first set. - `edit_team()` allowlist now accepts `demo_video_url`; value is trimmed, capped at 500 chars, and empty strings clear the field. - New `POST /api/team/<teamid>/demo-video` mirrors the `/devpost` endpoint for team-member self-serve (auth-required, no admin permission). Admin edits continue to flow through `PATCH /api/team/edit`. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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 does the PR do?
Adds a per-team
demo_video_url(string) so each team can attach a single demo video link (YouTube, Vimeo, Loom, or Google Drive) that the public event and results pages will render in the team card. Mirrors the existingdevpost_linkshape, including a companiondemo_video_url_submittedISO timestamp stamped on first set.Changes:
edit_team()field allowlist now acceptsdemo_video_url. Value is trimmed, capped at 500 chars, and empty strings are coerced tonullso admins can clear the field by submitting an empty input.POST /api/team/<teamid>/demo-videomirrors the existing/devpostendpoint so a logged-in team member can self-serve their team's demo video (same auth model as devpost — no admin permission required). Admin edits continue to flow throughPATCH /api/team/edit(volunteer.admin).teamsdocument.Type of change
Linked Issue
None.
Make sure you have
Frontend companion
Frontend consumers (event-page team cards, winner cards,
/manageteamself-serve form,/admin/teamsDemo Video column + filter chips) are on a separate branch inopportunity-hack/frontend-ohack.dev.🤖 Generated with Claude Code