Skip to content

Commit

Permalink
Fixed RestoreTrashFile api call
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Boulongne <[email protected]>
  • Loading branch information
KevinBoulongne committed Feb 11, 2022
1 parent 6525680 commit f7c6d1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ class ApiRepositoryTest : KDriveTest() {
}

// Restore the file from the trash
assertApiResponse(postRestoreTrashFile(modifiedFile, mapOf("destination_folder_id" to ROOT_ID)))
assertApiResponse(postRestoreTrashFile(modifiedFile, mapOf("destination_directory_id" to ROOT_ID)))
with(getDriveTrash(userDrive.driveId, File.SortType.RECENT, 1)) {
assertApiResponse(this)
if (data!!.isNotEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class TrashViewModel : ViewModel() {

fun restoreTrashFile(file: File, newFolder: File? = null) =
liveData(Dispatchers.IO) {
val body = newFolder?.let { mapOf("destination_folder_id" to newFolder.id) }
val body = newFolder?.let { mapOf("destination_directory_id" to newFolder.id) }
emit(ApiRepository.postRestoreTrashFile(file, body))
}

Expand Down

0 comments on commit f7c6d1b

Please sign in to comment.