send messeges, fix #12
This commit is contained in:
parent
3f29e8c4e7
commit
e487aebc4e
@ -18,7 +18,7 @@ urlpatterns = [
|
|||||||
path('player/media/op/', views.FileOperations.as_view()),
|
path('player/media/op/', views.FileOperations.as_view()),
|
||||||
re_path(r'^player/media/upload/(?P<filename>[^/]+)$',
|
re_path(r'^player/media/upload/(?P<filename>[^/]+)$',
|
||||||
views.FileUpload.as_view()),
|
views.FileUpload.as_view()),
|
||||||
path('player/messenger/send/', views.MessegeSender.as_view()),
|
path('player/send/message/', views.MessageSender.as_view()),
|
||||||
path('player/playlist/', views.Playlist.as_view()),
|
path('player/playlist/', views.Playlist.as_view()),
|
||||||
path('player/stats/', views.Statistics.as_view()),
|
path('player/stats/', views.Statistics.as_view()),
|
||||||
path('player/user/current/', views.CurrentUserView.as_view()),
|
path('player/user/current/', views.CurrentUserView.as_view()),
|
||||||
|
@ -58,7 +58,10 @@ class MessengerViewSet(viewsets.ModelViewSet):
|
|||||||
filterset_class = MessengerFilter
|
filterset_class = MessengerFilter
|
||||||
|
|
||||||
|
|
||||||
class MessegeSender(APIView):
|
class MessageSender(APIView):
|
||||||
|
"""
|
||||||
|
send messages with zmq to the playout engine
|
||||||
|
"""
|
||||||
|
|
||||||
def post(self, request, *args, **kwargs):
|
def post(self, request, *args, **kwargs):
|
||||||
if 'data' in request.data:
|
if 'data' in request.data:
|
||||||
|
@ -223,7 +223,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import { mapState } from 'vuex'
|
|
||||||
import Menu from '@/components/Menu.vue'
|
import Menu from '@/components/Menu.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -406,7 +405,7 @@ export default {
|
|||||||
boxborderw: this.form.border
|
boxborderw: this.form.border
|
||||||
}
|
}
|
||||||
|
|
||||||
const response = await this.$axios.post('api/player/messenger/send/', { data: obj })
|
const response = await this.$axios.post('api/player/send/message/', { data: obj })
|
||||||
|
|
||||||
if (response.data && response.data.status.Success && response.data.status.Success === '0 Success') {
|
if (response.data && response.data.status.Success && response.data.status.Success === '0 Success') {
|
||||||
this.success = true
|
this.success = true
|
||||||
@ -418,7 +417,7 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style scoped>
|
||||||
.messege-container {
|
.messege-container {
|
||||||
margin-top: 5em;
|
margin-top: 5em;
|
||||||
}
|
}
|
||||||
@ -427,4 +426,9 @@ export default {
|
|||||||
width: 50%;
|
width: 50%;
|
||||||
margin-bottom: 2em;
|
margin-bottom: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sub-btn {
|
||||||
|
min-width: 90px;
|
||||||
|
max-width: 100px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user