mirror of
https://github.com/bellingcat/auto-archiver-api.git
synced 2026-06-11 21:18:35 +03:00
delete op
This commit is contained in:
10
src/main.py
10
src/main.py
@@ -89,6 +89,16 @@ def get_status(task_id, access_token:str):
|
||||
})
|
||||
|
||||
|
||||
@app.delete("/tasks/{task_id}")
|
||||
def get_status(task_id, access_token:str, db: Session = Depends(get_db)):
|
||||
email = validate_user_get_email(access_token)
|
||||
logger.info(f"deleting task {task_id} request by {email}")
|
||||
return JSONResponse({
|
||||
"id": task_id,
|
||||
"deleted": crud.delete_task(db, task_id, email)
|
||||
})
|
||||
|
||||
|
||||
@app.get("/")
|
||||
def home():
|
||||
return JSONResponse({"status": "good", "version": VERSION})
|
||||
|
||||
Reference in New Issue
Block a user