Skip to content

Commit

Permalink
source API: /archive -> /get_bvids_by
Browse files Browse the repository at this point in the history
  • Loading branch information
yzqzss committed Jun 15, 2024
1 parent b34d30b commit aa5a9b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions biliarchiver/rest_api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ async def source_action(fun, source_type: str, source_id: str, TRUNCATE=20):

bvids = read_bvids_from_txt(txt_path)

return {"source_type": source_type, "source_id": source_id, "bvids": bvids}
return {"success": True, "bvids": bvids}

@app.post("/archive/{source_type}/{source_id}")
@app.post("/get_bvids_by/{source_type}/{source_id}")
async def perform_source_action_from_req(source_type: str, source_id: str):
# make sure source_id is valid integer
if not source_id.isdecimal():
Expand Down

0 comments on commit aa5a9b5

Please sign in to comment.