mirror of
https://github.com/bellingcat/auto-archiver-api.git
synced 2026-06-12 05:28:34 +03:00
Format and lint web directory (#67)
This commit is contained in:
@@ -5,12 +5,12 @@ from fastapi.encoders import jsonable_encoder
|
||||
|
||||
def custom_jsonable_encoder(obj):
|
||||
if isinstance(obj, bytes):
|
||||
return base64.b64encode(obj).decode('utf-8')
|
||||
return base64.b64encode(obj).decode("utf-8")
|
||||
return jsonable_encoder(obj)
|
||||
|
||||
|
||||
def convert_priority_to_queue_dict(priority: str) -> dict:
|
||||
return {
|
||||
"priority": 0 if priority == "high" else 10,
|
||||
"queue": f"{priority}_priority"
|
||||
"queue": f"{priority}_priority",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user