mirror of
https://github.com/wolfswolke/DeathGarden_API_Rebirth.git
synced 2026-04-26 00:10:28 -05:00
Temp removed file handler endpoint code
This commit is contained in:
parent
29f51b1e9a
commit
a3e8798f7a
|
|
@ -494,9 +494,10 @@ def upload():
|
||||||
def download(file_id):
|
def download(file_id):
|
||||||
check_for_game_client("soft")
|
check_for_game_client("soft")
|
||||||
try:
|
try:
|
||||||
file = file_handler.get_file(file_id)
|
#file = file_handler.get_file(file_id)
|
||||||
|
file = None
|
||||||
if file is None:
|
if file is None:
|
||||||
return jsonify({"status": "error", "message": "File not found."}), 404
|
return jsonify({"status": "error", "message": "File not found."}), 404
|
||||||
return file
|
return file
|
||||||
except TimeoutError:
|
except TimeoutError:
|
||||||
return jsonify({"status": "error"})
|
return jsonify({"status": "error"})
|
||||||
|
|
@ -508,10 +509,11 @@ def download(file_id):
|
||||||
def metadata(file_id):
|
def metadata(file_id):
|
||||||
check_for_game_client("soft")
|
check_for_game_client("soft")
|
||||||
try:
|
try:
|
||||||
metadata = file_handler.get_metadata(file_id)
|
#metadata = file_handler.get_metadata(file_id)
|
||||||
if metadata is None:
|
metadata_data = None
|
||||||
|
if metadata_data is None:
|
||||||
return jsonify({"status": "error", "message": "File not found."}), 404
|
return jsonify({"status": "error", "message": "File not found."}), 404
|
||||||
return jsonify(metadata)
|
return jsonify(metadata_data)
|
||||||
except TimeoutError:
|
except TimeoutError:
|
||||||
return jsonify({"status": "error"})
|
return jsonify({"status": "error"})
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
@ -522,10 +524,11 @@ def metadata(file_id):
|
||||||
def sha256(file_id):
|
def sha256(file_id):
|
||||||
check_for_game_client("soft")
|
check_for_game_client("soft")
|
||||||
try:
|
try:
|
||||||
sha256 = file_handler.get_file_sha256(file_id)
|
#sha256 = file_handler.get_file_sha256(file_id)
|
||||||
if sha256 is None:
|
sha256_data = None
|
||||||
|
if sha256_data is None:
|
||||||
return jsonify({"status": "error", "message": "File not found."}), 404
|
return jsonify({"status": "error", "message": "File not found."}), 404
|
||||||
return jsonify({"sha256": sha256})
|
return jsonify({"sha256": sha256_data})
|
||||||
except TimeoutError:
|
except TimeoutError:
|
||||||
return jsonify({"status": "error"})
|
return jsonify({"status": "error"})
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user