Skip to content
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

Addons: rename fields on API response #11764

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions readthedocs/proxito/tests/test_hosting.py
Original file line number Diff line number Diff line change
Expand Up @@ -984,26 +984,26 @@ def test_file_tree_diff(self, get_manifest):
{
"filename": "new-file.html",
"urls": {
"version_a": "https://project--123.dev.readthedocs.build/en/123/new-file.html",
"version_b": "https://project.dev.readthedocs.io/en/latest/new-file.html",
"current": "https://project--123.dev.readthedocs.build/en/123/new-file.html",
"base": "https://project.dev.readthedocs.io/en/latest/new-file.html",
},
},
],
"deleted": [
{
"filename": "deleted.html",
"urls": {
"version_a": "https://project--123.dev.readthedocs.build/en/123/deleted.html",
"version_b": "https://project.dev.readthedocs.io/en/latest/deleted.html",
"current": "https://project--123.dev.readthedocs.build/en/123/deleted.html",
"base": "https://project.dev.readthedocs.io/en/latest/deleted.html",
},
},
],
"modified": [
{
"filename": "tutorial/index.html",
"urls": {
"version_a": "https://project--123.dev.readthedocs.build/en/123/tutorial/index.html",
"version_b": "https://project.dev.readthedocs.io/en/latest/tutorial/index.html",
"current": "https://project--123.dev.readthedocs.build/en/123/tutorial/index.html",
"base": "https://project.dev.readthedocs.io/en/latest/tutorial/index.html",
},
},
],
Expand Down
12 changes: 6 additions & 6 deletions readthedocs/proxito/views/hosting.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,12 +657,12 @@ def _get_filetreediff_response(self, *, request, project, version, resolver):
{
"filename": filename,
"urls": {
"version_a": resolver.resolve_version(
"current": resolver.resolve_version(
project=project,
filename=filename,
version=version,
),
"version_b": resolver.resolve_version(
"base": resolver.resolve_version(
project=project,
filename=filename,
version=latest_version,
Expand All @@ -675,12 +675,12 @@ def _get_filetreediff_response(self, *, request, project, version, resolver):
{
"filename": filename,
"urls": {
"version_a": resolver.resolve_version(
"current": resolver.resolve_version(
project=project,
filename=filename,
version=version,
),
"version_b": resolver.resolve_version(
"base": resolver.resolve_version(
project=project,
filename=filename,
version=latest_version,
Expand All @@ -693,12 +693,12 @@ def _get_filetreediff_response(self, *, request, project, version, resolver):
{
"filename": filename,
"urls": {
"version_a": resolver.resolve_version(
"current": resolver.resolve_version(
project=project,
filename=filename,
version=version,
),
"version_b": resolver.resolve_version(
"base": resolver.resolve_version(
project=project,
filename=filename,
version=latest_version,
Expand Down