mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-11-21 20:35:58 +03:00
fix: Move to EmptyResponse instead off now unsupported Void
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
40d8e45d6c
commit
5b708a2e87
3 changed files with 6 additions and 3 deletions
|
@ -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)) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue