mirror of
https://github.com/onyx-and-iris/vmr-http.git
synced 2026-04-07 02:13:31 +00:00
switch to sync endpoints, there isn't a lot of value in keeping them async.
patch bump
This commit is contained in:
@@ -25,7 +25,7 @@ _reversed_busmodes = {v: k for k, v in _readable_busmodes.items()}
|
||||
|
||||
@router.patch('')
|
||||
@router.put('')
|
||||
async def update_bus_mode(index: int, mode: str = Body(..., embed=True), voicemeeter=Depends(get_voicemeeter_client)):
|
||||
def update_bus_mode(index: int, mode: str = Body(..., embed=True), voicemeeter=Depends(get_voicemeeter_client)):
|
||||
"""Update the bus mode for the specified bus index."""
|
||||
if mode not in _reversed_busmodes:
|
||||
raise HTTPException(
|
||||
@@ -36,6 +36,6 @@ async def update_bus_mode(index: int, mode: str = Body(..., embed=True), voiceme
|
||||
|
||||
|
||||
@router.get('')
|
||||
async def get_bus_mode(index: int, voicemeeter=Depends(get_voicemeeter_client)):
|
||||
def get_bus_mode(index: int, voicemeeter=Depends(get_voicemeeter_client)):
|
||||
"""Get the current bus mode for the specified bus index."""
|
||||
return {'mode': _readable_busmodes.get(voicemeeter.bus[index].mode.get(), 'Unknown')}
|
||||
|
||||
Reference in New Issue
Block a user