fix: Move to EmptyResponse instead off now unsupported Void

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2024-05-22 20:17:45 +02:00
parent 40d8e45d6c
commit 5b708a2e87
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
3 changed files with 6 additions and 3 deletions

View file

@ -12,6 +12,7 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.gson.annotations.Expose;
import com.nextcloud.android.sso.api.EmptyResponse;
import com.nextcloud.android.sso.api.NextcloudAPI;
import com.nextcloud.android.sso.api.ParsedResponse;
@ -119,7 +120,7 @@ public class NotesAPI {
}
}
public Call<Void> deleteNote(long noteId) {
public Call<EmptyResponse> deleteNote(long noteId) {
if (ApiVersion.API_VERSION_1_0.equals(usedApiVersion)) {
return notesAPI_1_0.deleteNote(noteId);
} else if (ApiVersion.API_VERSION_0_2.equals(usedApiVersion)) {

View file

@ -6,6 +6,7 @@
*/
package it.niedermann.owncloud.notes.persistence.sync;
import com.nextcloud.android.sso.api.EmptyResponse;
import com.nextcloud.android.sso.api.ParsedResponse;
import java.util.List;
@ -43,5 +44,5 @@ public interface NotesAPI_0_2 {
Call<Note> editNote(@Body NotesAPI.Note_0_2 note, @Path("remoteId") long remoteId);
@DELETE("notes/{remoteId}")
Call<Void> deleteNote(@Path("remoteId") long noteId);
Call<EmptyResponse> deleteNote(@Path("remoteId") long noteId);
}

View file

@ -6,6 +6,7 @@
*/
package it.niedermann.owncloud.notes.persistence.sync;
import com.nextcloud.android.sso.api.EmptyResponse;
import com.nextcloud.android.sso.api.ParsedResponse;
import java.util.List;
@ -44,7 +45,7 @@ public interface NotesAPI_1_0 {
Call<Note> editNote(@Body Note note, @Path("remoteId") long remoteId);
@DELETE("notes/{remoteId}")
Call<Void> deleteNote(@Path("remoteId") long noteId);
Call<EmptyResponse> deleteNote(@Path("remoteId") long noteId);
@GET("settings")
Call<NotesSettings> getSettings();