Bladeren bron

Fix: copy folder api

liweihao 5 jaren geleden
bovenliggende
commit
f3dbba2267
1 gewijzigde bestanden met toevoegingen van 5 en 17 verwijderingen
  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(