Parcourir la source

Fix: copy folder api

liweihao il y a 5 ans
Parent
commit
f3dbba2267

+ 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(