rename urls
This commit is contained in:
parent
743fc99bae
commit
0e1558c040
@ -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<filename>[^/]+)$',
|
||||
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()),
|
||||
]
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user