From 0e1558c0402c275ccace24d362d191c56372e7b4 Mon Sep 17 00:00:00 2001 From: Jonathan Baecker Date: Mon, 4 May 2020 12:16:04 +0200 Subject: [PATCH] rename urls --- ffplayout/api_player/urls.py | 14 +++++++------- ffplayout/frontend/pages/message.vue | 2 +- ffplayout/frontend/store/config.js | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ffplayout/api_player/urls.py b/ffplayout/api_player/urls.py index 6e1a0d3f..f23814fc 100644 --- a/ffplayout/api_player/urls.py +++ b/ffplayout/api_player/urls.py @@ -4,7 +4,7 @@ from rest_framework import routers from . import views router = routers.DefaultRouter() -router.register(r'users', views.UserViewSet) +router.register(r'user/users', views.UserViewSet) router.register(r'guisettings', views.GuiSettingsViewSet, 'guisettings') router.register(r'messenger', views.MessengerViewSet, 'messenger') @@ -13,14 +13,14 @@ app_name = 'api_player' urlpatterns = [ path('player/', include(router.urls)), path('player/config/', views.Config.as_view()), - path('player/system/', views.SystemCtl.as_view()), - path('player/playlist/', views.Playlist.as_view()), - path('player/stats/', views.Statistics.as_view()), path('player/log/', views.LogReader.as_view()), - path('player/current/user/', views.CurrentUserView.as_view()), path('player/media/', views.Media.as_view()), - path('player/send/', views.MessegeSender.as_view()), + path('player/media/op/', views.FileOperations.as_view()), re_path(r'^player/media/upload/(?P[^/]+)$', views.FileUpload.as_view()), - path('player/media/op/', views.FileOperations.as_view()), + path('player/messenger/send/', views.MessegeSender.as_view()), + path('player/playlist/', views.Playlist.as_view()), + path('player/stats/', views.Statistics.as_view()), + path('player/user/current/', views.CurrentUserView.as_view()), + path('player/system/', views.SystemCtl.as_view()), ] diff --git a/ffplayout/frontend/pages/message.vue b/ffplayout/frontend/pages/message.vue index fa49ec03..d86e3ab3 100644 --- a/ffplayout/frontend/pages/message.vue +++ b/ffplayout/frontend/pages/message.vue @@ -411,7 +411,7 @@ export default { boxborderw: this.form.border } - const response = await this.$axios.post('api/player/send/', { data: obj }) + const response = await this.$axios.post('api/player/messenger/send/', { data: obj }) if (response.data && response.data.status.Success && response.data.status.Success === '0 Success') { this.success = true diff --git a/ffplayout/frontend/store/config.js b/ffplayout/frontend/store/config.js index ef25fe27..2bcd7ef9 100644 --- a/ffplayout/frontend/store/config.js +++ b/ffplayout/frontend/store/config.js @@ -64,8 +64,8 @@ export const actions = { }, async getUserConfig ({ commit, state }) { - const user = await this.$axios.get('api/player/current/user/') - const response = await this.$axios.get(`api/player/users/?username=${user.data.username}`) + const user = await this.$axios.get('api/player/user/current/') + const response = await this.$axios.get(`api/player/user/users/?username=${user.data.username}`) if (user.data) { commit('SET_CURRENT_USER', user.data.username) @@ -76,7 +76,7 @@ export const actions = { }, async setUserConfig ({ commit, state }, obj) { - const update = await this.$axios.put(`api/player/users/${obj.id}/`, obj) + const update = await this.$axios.put(`api/player/user/users/${obj.id}/`, obj) return update } }