thunderstore-io / Thunderstore

Thunderstore is a mod database and API for downloading mods. Thunderstore Discord: https://discord.thunderstore.io/
https://thunderstore.io/
GNU Affero General Public License v3.0
138 stars 28 forks source link

Fix recently introduced issues in experimental API #888

Closed MythicManiac closed 1 year ago

MythicManiac commented 1 year ago

Introduce back the old 'teams' field in the current user experimental API, as it's used by some API clients. Provide the new structure in a 'teams_full' field instead.

Additionally make the OAuth connection rendering not fail if some field is missing, as we can't guarantee any of the extra data to exist.

codecov[bot] commented 1 year ago

Codecov Report

All modified lines are covered by tests :white_check_mark:

Comparison is base (216a20f) 92.20% compared to head (2ef5ba9) 92.21%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #888 +/- ## ======================================= Coverage 92.20% 92.21% ======================================= Files 270 270 Lines 7737 7741 +4 Branches 736 737 +1 ======================================= + Hits 7134 7138 +4 Misses 501 501 Partials 102 102 ``` | [Files](https://app.codecov.io/gh/thunderstore-io/Thunderstore/pull/888?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thunderstore-io) | Coverage Δ | | |---|---|---| | [...tore/social/api/experimental/views/current\_user.py](https://app.codecov.io/gh/thunderstore-io/Thunderstore/pull/888?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thunderstore-io#diff-ZGphbmdvL3RodW5kZXJzdG9yZS9zb2NpYWwvYXBpL2V4cGVyaW1lbnRhbC92aWV3cy9jdXJyZW50X3VzZXIucHk=) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.