new tests and abstractions

This commit is contained in:
msramalho
2024-10-18 19:46:56 +01:00
parent 56a81f6ec0
commit 6b9d6e2245
5 changed files with 45 additions and 32 deletions

View File

@@ -23,4 +23,4 @@ def submit_manual_archive(manual: schemas.SubmitManual, auth=Depends(token_api_k
except sqlalchemy.exc.IntegrityError as e:
logger.error(e)
raise HTTPException(status_code=422, detail=f"Cannot insert into DB due to integrity error")
return JSONResponse({"id": archive_id})
return JSONResponse({"id": archive_id}, status_code=201)