mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-03 05:09:58 -05:00
Replacing icon property when icon has been requested.
Creating <APIButton/> which handles success/failure/pending during API calls.
This commit is contained in:
parent
237b429cbf
commit
59c4ab2502
24 changed files with 483 additions and 334 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import asyncio
|
||||
from http import HTTPStatus
|
||||
|
||||
from sanic import response, Blueprint
|
||||
|
|
@ -60,7 +61,7 @@ async def search(_: Request, body: schema.VideoSearchRequest):
|
|||
@openapi.response(HTTPStatus.NOT_FOUND, JSONErrorResponse)
|
||||
@wrol_mode_check
|
||||
@run_after(lib.save_channels_config)
|
||||
def video_delete(_: Request, video_ids: str):
|
||||
async def video_delete(_: Request, video_ids: str):
|
||||
try:
|
||||
video_ids = [int(i) for i in str(video_ids).split(',')]
|
||||
except Exception:
|
||||
|
|
@ -69,4 +70,4 @@ def video_delete(_: Request, video_ids: str):
|
|||
lib.delete_videos(*video_ids)
|
||||
|
||||
Events.send_deleted(f'Deleted {len(video_ids)} videos')
|
||||
return response.raw('', HTTPStatus.NO_CONTENT)
|
||||
return response.empty()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue