Skip to content

Add UpdateEvent component#13

Merged
slashtechno merged 7 commits intohackclub:mainfrom
Kapitar:main
Apr 6, 2025
Merged

Add UpdateEvent component#13
slashtechno merged 7 commits intohackclub:mainfrom
Kapitar:main

Conversation

@Kapitar
Copy link
Contributor

@Kapitar Kapitar commented Mar 23, 2025

replaced make-votable POST endpoint with change-votable PUT endpoint

@vercel
Copy link

vercel bot commented Mar 23, 2025

@Kapitar is attempting to deploy a commit to the Hack Club Team on Vercel.

A member of the Team first needs to authorize it.

@slashtechno
Copy link
Collaborator

I don't think it makes sense to change it to a PUT endpoint if it's still only used to toggle viability. The client doesn't even send a request body.

Frankly, I think there's no point touching the endpoint until it's turned into an endpoint for updating the entire event.

I do like the toast to show the voting status though!

@Kapitar
Copy link
Contributor Author

Kapitar commented Mar 23, 2025

got it! i wanted to change it because you said that "I made this endpoint while I was at MakerHacks in S.F. and I urgently needed to lock voting, needs to be replaced with a real put endpoint" in the slack. i think i got it wrong :( as i understood you wanted an endpoint to update the whole event as a whole instead of just updating one thing in the event?

@slashtechno
Copy link
Collaborator

slashtechno commented Mar 23, 2025

Yeah, I could have phrased the original message better, sorry!

I meant a PUT endpoint to update the entire event. I can always implement it later but if you want to make the change I'll gladly merge it!

routers/projects.py contains an update_project endpoint that might be helpful.

@Kapitar
Copy link
Contributor Author

Kapitar commented Mar 23, 2025

got it no problems! since i will make a PUT endpoint to change the event, i also want to make an event edit page

@slashtechno
Copy link
Collaborator

For now, maybe just make an UpdateEvent component (similar to UpdateProject) in a collapsible section on the existing events page. A separate page might eventually be ideal, but I think it's better to maintain the pattern of using collapsible sections until the rest of the project also gets changed.

@Kapitar
Copy link
Contributor Author

Kapitar commented Mar 25, 2025

changed make votable to update the whole event.
there should be a fetch after deletion/update of the event, but i would do it in another PR because there is also the same bug in projects collapse

@slashtechno slashtechno moved this to In Progress in Podium Apr 5, 2025
@slashtechno slashtechno changed the title Change make-votable endpoint to PUT endpoint Add UpdateEvent component Apr 5, 2025
@slashtechno slashtechno merged commit 6df2f94 into hackclub:main Apr 6, 2025
1 check failed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Podium Apr 6, 2025
Copy link
Collaborator

@slashtechno slashtechno Apr 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved my accidental removal of the Airtable API call in d926f35. The commit got made to to the repo instead of this PR.

@slashtechno slashtechno added the enhancement New feature or request label Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants