Refactor radio endpoint requests to remove API key requirement and implement user role checks for permissions
This commit is contained in:
@@ -135,7 +135,6 @@ class ValidRadioSongRequest(BaseModel):
|
||||
Request model for radio song request.
|
||||
|
||||
Attributes:
|
||||
- **key** (str): API Key.
|
||||
- **artist** (Optional[str]): Artist to search.
|
||||
- **song** (Optional[str]): Song to search.
|
||||
- **artistsong** (Optional[str]): Combined artist-song string.
|
||||
@@ -143,7 +142,6 @@ class ValidRadioSongRequest(BaseModel):
|
||||
- **station** (Station): Station name.
|
||||
"""
|
||||
|
||||
key: str
|
||||
artist: Optional[str] = None
|
||||
song: Optional[str] = None
|
||||
artistsong: Optional[str] = None
|
||||
@@ -180,12 +178,10 @@ class ValidRadioNextRequest(BaseModel):
|
||||
Request model for radio next track.
|
||||
|
||||
Attributes:
|
||||
- **key** (str): API Key.
|
||||
- **skipTo** (Optional[str]): UUID to skip to.
|
||||
- **station** (Station): Station name.
|
||||
"""
|
||||
|
||||
key: str
|
||||
skipTo: Optional[str] = None
|
||||
station: Station = "main"
|
||||
|
||||
@@ -222,13 +218,11 @@ class ValidRadioQueueShiftRequest(BaseModel):
|
||||
Request model for radio queue shift.
|
||||
|
||||
Attributes:
|
||||
- **key** (str): API Key.
|
||||
- **uuid** (str): UUID to shift.
|
||||
- **next** (Optional[bool]): Play next if true.
|
||||
- **station** (Station): Station name.
|
||||
"""
|
||||
|
||||
key: str
|
||||
uuid: str
|
||||
next: Optional[bool] = False
|
||||
station: Station = "main"
|
||||
@@ -239,11 +233,9 @@ class ValidRadioQueueRemovalRequest(BaseModel):
|
||||
Request model for radio queue removal.
|
||||
|
||||
Attributes:
|
||||
- **key** (str): API Key.
|
||||
- **uuid** (str): UUID to remove.
|
||||
- **station** (Station): Station name.
|
||||
"""
|
||||
|
||||
key: str
|
||||
uuid: str
|
||||
station: Station = "main"
|
||||
|
Reference in New Issue
Block a user