cfr #121 Co-authored-by: Christophe Siraut <d@tobald.eu.org> Co-authored-by: bkfox <thomas bkfox net> Co-authored-by: Thomas Kairos <thomas@bkfox.net> Reviewed-on: #131 Co-authored-by: Chris Tactic <ctactic@noreply.git.radiocampus.be> Co-committed-by: Chris Tactic <ctactic@noreply.git.radiocampus.be>
		
			
				
	
	
		
			26 lines
		
	
	
		
			758 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			758 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
from django.urls import include, path
 | 
						|
from rest_framework.routers import DefaultRouter
 | 
						|
 | 
						|
from aircox.viewsets import SoundViewSet
 | 
						|
 | 
						|
from . import views, viewsets
 | 
						|
 | 
						|
 | 
						|
__all__ = ("api", "urls")
 | 
						|
 | 
						|
 | 
						|
prefix = "<int:station_pk>/"
 | 
						|
 | 
						|
 | 
						|
router = DefaultRouter(use_regex_path=False)
 | 
						|
router.register(prefix + "playlist", viewsets.PlaylistSourceViewSet, basename="streamer-playlist")
 | 
						|
router.register(prefix + "queue", viewsets.QueueSourceViewSet, basename="streamer-queue")
 | 
						|
router.register("streamer", viewsets.StreamerViewSet, basename="streamer")
 | 
						|
router.register("sound", SoundViewSet, basename="sound")
 | 
						|
 | 
						|
api = router.urls
 | 
						|
urls = [
 | 
						|
    path("api/", include((api, "aircox_streamer"), namespace="api")),
 | 
						|
    path("", views.StreamerView.as_view(), name="dashboard-streamer"),
 | 
						|
]
 |