(feat:connector) sync fixes UI, minor refactor

This commit is contained in:
ManishMadan2882
2025-09-02 20:28:23 +05:30
parent f9b2c95695
commit 3b3a04a249
5 changed files with 102 additions and 47 deletions

View File

@@ -3965,12 +3965,24 @@ class DirectoryStructure(Resource):
)
directory_structure = doc.get("directory_structure", {})
base_path = doc.get("file_path", "")
provider = None
remote_data = doc.get("remote_data")
try:
if isinstance(remote_data, str) and remote_data:
remote_data_obj = json.loads(remote_data)
provider = remote_data_obj.get("provider")
except Exception as e:
current_app.logger.warning(
f"Failed to parse remote_data for doc {doc_id}: {e}")
return make_response(
jsonify({
"success": True,
"directory_structure": directory_structure,
"base_path": doc.get("file_path", "")
"base_path": base_path,
"provider": provider,
}), 200
)