瀏覽代碼

Fix: copy folder api

liweihao 5 年之前
父節點
當前提交
f3dbba2267
共有 1 個文件被更改,包括 5 次插入17 次删除
  1. 5 17
      src/main/java/com/example/kdan_data_center/datacenter/folder/FolderService.kt

+ 5 - 17
src/main/java/com/example/kdan_data_center/datacenter/folder/FolderService.kt

@@ -86,32 +86,20 @@ interface FolderService {
     ): Observable<FolderInfoData>
 
     @POST("copy")
-    fun copyFolder(
-            @Header("Authorization") accessToken: String,
-            @Header("Content-Type") contentType: String,
-            @Body selectFolderWithParent: SelectFolderWithParent
-    )
-
-    @POST("copy")
+    @FormUrlEncoded
     fun copyFolder(
             @Header("Authorization") accessToken: String,
             @Field("parent_id") parentId: Int?,
             @Field("folder_id") folderId: Int
-    )
+    ): Observable<FolderInfoData>
 
     @POST("copy")
+    @FormUrlEncoded
     fun copyFolder(
             @Header("Authorization") accessToken: String,
             @Field("parent_id") parentId: Int?,
-            @Field("folder_id_list") folderIdList: List<Int>
-    )
-
-    @PUT("move")
-    fun moveFolder(
-            @Header("Authorization") accessToken: String,
-            @Header("Content-Type") contentType: String,
-            @Body selectFolderWithParent: SelectFolderWithParent
-    )
+            @Field("folder_id_list[]") folderIdList: IntArray
+    ): Observable<FolderInfoData>
 
     @PUT("move")
     fun moveFolder(