diff --git a/api/funkwhale_api/instance/urls.py b/api/funkwhale_api/instance/urls.py index e66fdf88d70cc1c16dba01552e9ff88bde1d22d3..f506488fc4db7819da6aae5d5c79fe33e8a9af5c 100644 --- a/api/funkwhale_api/instance/urls.py +++ b/api/funkwhale_api/instance/urls.py @@ -4,6 +4,6 @@ from . import views urlpatterns = [ - url(r'^nodeinfo/$', views.NodeInfo.as_view(), name='nodeinfo'), + url(r'^nodeinfo/2.0/$', views.NodeInfo.as_view(), name='nodeinfo-2.0'), url(r'^settings/$', views.InstanceSettings.as_view(), name='settings'), ] diff --git a/api/tests/instance/test_views.py b/api/tests/instance/test_views.py index c67688d537c76c7b16dc21f02b8df1e0cd838a5a..4ac79086e5461324b0a4216697441516997237d6 100644 --- a/api/tests/instance/test_views.py +++ b/api/tests/instance/test_views.py @@ -7,7 +7,7 @@ def test_nodeinfo_endpoint(db, api_client, mocker): } mocked_nodeinfo = mocker.patch( 'funkwhale_api.instance.nodeinfo.get', return_value=payload) - url = reverse('api:v1:instance:nodeinfo') + url = reverse('api:v1:instance:nodeinfo-2.0') response = api_client.get(url) assert response.status_code == 200 @@ -16,7 +16,7 @@ def test_nodeinfo_endpoint(db, api_client, mocker): def test_nodeinfo_endpoint_disabled(db, api_client, preferences): preferences['instance__nodeinfo_enabled'] = False - url = reverse('api:v1:instance:nodeinfo') + url = reverse('api:v1:instance:nodeinfo-2.0') response = api_client.get(url) assert response.status_code == 404 diff --git a/front/src/components/instance/Stats.vue b/front/src/components/instance/Stats.vue index 3b96afe9666b3060fdfa02fec05fe366291c11a0..ac144ceb3a910e50e59ea9f9efd0575d2c037a0a 100644 --- a/front/src/components/instance/Stats.vue +++ b/front/src/components/instance/Stats.vue @@ -77,7 +77,7 @@ export default { var self = this this.isLoading = true logger.default.debug('Fetching instance stats...') - axios.get('instance/nodeinfo/').then((response) => { + axios.get('instance/nodeinfo/2.0/').then((response) => { let d = response.data self.stats = {} self.stats.users = _.get(d, 'usage.users.total')