Fixing archive deleting.

This commit is contained in:
Roland 2021-12-31 22:35:23 -07:00
parent fb1f1c6926
commit 3cb2aaf6cf
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
10 changed files with 202 additions and 111 deletions

View file

@ -32,7 +32,7 @@ async def post_archive(_: Request, data: dict):
return response.empty()
@bp.delete('/<url_id:int>')
@bp.delete('/<archive_id:int>')
@validate_doc(
'Delete a website record',
responses=[
@ -40,8 +40,8 @@ async def post_archive(_: Request, data: dict):
]
)
@wrol_mode_check
async def delete_url(_: Request, url_id: int):
lib.delete_url(url_id)
async def delete_archive(_: Request, archive_id: int):
lib.delete_archive(archive_id)
return response.empty()
@ -84,6 +84,7 @@ async def fetch_domains(_: Request):
'Search archive contents and titles',
consumes=ArchiveSearchRequest,
produces=ArchiveSearchResponse,
optional_body=True,
)
async def search_archives(_: Request, data: dict):
try: