Spaces:
Paused
Paused
Commit ·
f27e7ee
1
Parent(s): 847e941
fix api
Browse files268 unmodified lines2692702712722732742753 unmodified lines279280281282283284285268 unmodified linesproxies = get_system_proxies()return jsonify({"proxies": proxies})@app.route('/api/size', methods=['GET'])def get_cache_size_api():total_size = 0for dirpath, dirnames, filenames in os.walk(CACHE_DIR):3 unmodified linesreadable_size = bytes_to_human_readable(total_size)return jsonify({"cache_size": readable_size})@app.route('/api/clear_cache', methods=['POST'])def clear_cache_api():for dirpath, dirnames, filenames in os.walk(CACHE_DIR):for f in filenames:268 unmodified lines2692702712722732742753 unmodified lines279280281282283284285268 unmodified linesproxies = get_system_proxies()return jsonify({"proxies": proxies})@app.route('/api/cache/size', methods=['GET'])def get_cache_size_api():total_size = 0for dirpath, dirnames, filenames in os.walk(CACHE_DIR):3 unmodified linesreadable_size = bytes_to_human_readable(total_size)return jsonify({"cache_size": readable_size})@app.route('/api/cache/clear', methods=['POST'])def clear_cache_api():for dirpath, dirnames, filenames in os.walk(CACHE_DIR):for f in filenames:
app.py+2-2