mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-10 03:11:07 +00:00
[api2] Fix api change
This commit is contained in:
@@ -1052,7 +1052,7 @@ class OpMoveView(APIView):
|
|||||||
try:
|
try:
|
||||||
seafile_api.move_file(repo_id, parent_dir, file_name,
|
seafile_api.move_file(repo_id, parent_dir, file_name,
|
||||||
dst_repo, dst_dir, new_filename,
|
dst_repo, dst_dir, new_filename,
|
||||||
username)
|
username, 0, synchronous=1)
|
||||||
except SearpcError,e:
|
except SearpcError,e:
|
||||||
return api_error(HTTP_520_OPERATION_FAILED,
|
return api_error(HTTP_520_OPERATION_FAILED,
|
||||||
"Failed to move file.")
|
"Failed to move file.")
|
||||||
@@ -1097,7 +1097,7 @@ class OpCopyView(APIView):
|
|||||||
try:
|
try:
|
||||||
seafile_api.copy_file(repo_id, parent_dir, file_name,
|
seafile_api.copy_file(repo_id, parent_dir, file_name,
|
||||||
dst_repo, dst_dir, new_filename,
|
dst_repo, dst_dir, new_filename,
|
||||||
username)
|
username, 0, synchronous=1)
|
||||||
except SearpcError,e:
|
except SearpcError,e:
|
||||||
return api_error(HTTP_520_OPERATION_FAILED,
|
return api_error(HTTP_520_OPERATION_FAILED,
|
||||||
"Failed to copy file.")
|
"Failed to copy file.")
|
||||||
@@ -1288,7 +1288,7 @@ class FileView(APIView):
|
|||||||
seafile_api.move_file(src_repo_id, src_dir_utf8,
|
seafile_api.move_file(src_repo_id, src_dir_utf8,
|
||||||
filename_utf8, dst_repo_id,
|
filename_utf8, dst_repo_id,
|
||||||
dst_dir_utf8, new_filename_utf8,
|
dst_dir_utf8, new_filename_utf8,
|
||||||
username)
|
username, 0, synchronous=1)
|
||||||
except SearpcError, e:
|
except SearpcError, e:
|
||||||
return api_error(status.HTTP_500_INTERNAL_SERVER_ERROR,
|
return api_error(status.HTTP_500_INTERNAL_SERVER_ERROR,
|
||||||
"SearpcError:" + e.msg)
|
"SearpcError:" + e.msg)
|
||||||
|
Reference in New Issue
Block a user