Skip to content

Implement update team endpoint (TS-2314) #1116

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Roffenlund
Copy link
Contributor

@Roffenlund Roffenlund commented Mar 17, 2025

  • Implement and endpoint in cyberstorm api for updating teams
  • Support only updating donation_link for now
  • Implement tests
  • Implement service layer function for updating teams, and implement tests
  • Use the service layer function in the form view responsible for updating team donation links

@Roffenlund Roffenlund force-pushed the cyberstorm-api-update-team branch 3 times, most recently from 015f8b1 to d0b7f20 Compare March 18, 2025 09:09
@Roffenlund Roffenlund requested review from x753 and Oksamies March 18, 2025 09:18
Roffenlund added 2 commits May 8, 2025 18:44
Implement service layer function for updating teams. Support only
dontation_link at the moment. Implement tests.

Refs. TS-2314
@Roffenlund Roffenlund force-pushed the cyberstorm-api-update-team branch from d0b7f20 to dfc0a3b Compare May 8, 2025 15:45
@Roffenlund Roffenlund requested a review from x753 May 8, 2025 15:45
Copy link

codecov bot commented May 8, 2025

Codecov Report

Attention: Patch coverage is 93.93939% with 2 lines in your changes missing coverage. Please review.

Project coverage is 93.01%. Comparing base (0d673f3) to head (595edfd).

Files with missing lines Patch % Lines
django/thunderstore/repository/forms/team.py 75.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1116      +/-   ##
==========================================
- Coverage   93.02%   93.01%   -0.01%     
==========================================
  Files         324      324              
  Lines        9685     9709      +24     
  Branches      858      859       +1     
==========================================
+ Hits         9009     9031      +22     
- Misses        554      555       +1     
- Partials      122      123       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@MythicManiac MythicManiac left a comment

Choose a reason for hiding this comment

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

I don't see any hard blockers from my side, just a few oddities I thought I'd comment on.

Feel free to adjust or merge as-is as far as I'm concerned

@MythicManiac
Copy link
Member

Also as noted in #1117 (comment), I suspect the service layer functionality should be called from within the form class implementation instead of the view

Implement APIView for updating teams. Currently support only
dontation_link over PATCH request.

Add URl and update tests.

Refs. TS-2314
@Roffenlund Roffenlund force-pushed the cyberstorm-api-update-team branch from 1f21881 to 589b136 Compare May 9, 2025 08:40
@Roffenlund Roffenlund requested review from MythicManiac and removed request for x753 and Oksamies May 9, 2025 08:41
@Roffenlund Roffenlund force-pushed the cyberstorm-api-update-team branch from 589b136 to 15f11fb Compare May 9, 2025 11:55
@Roffenlund Roffenlund force-pushed the cyberstorm-api-update-team branch 2 times, most recently from d191a37 to 9d657af Compare May 9, 2025 14:28
@Roffenlund Roffenlund force-pushed the cyberstorm-api-update-team branch from 9d657af to e77dca3 Compare May 12, 2025 08:56
Use the service layer function in the form responsible for updating
team's donation_links. Utilize the service layer function in the form's
save function and update the view accordingly.

In order to invoke the post-validation errors added to the form in the
form tests, call form.save() in the tests as well.

Implement tests for the view in a similar manner as they are implemented
for the forms to assert functionality.

Refs. TS-2314
@Roffenlund Roffenlund force-pushed the cyberstorm-api-update-team branch from e77dca3 to 595edfd Compare May 12, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants