Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
chore(reminder): in ReminderRemoteDataSource remove return from metho…
Browse files Browse the repository at this point in the history
…d createNewReminderForLesson
  • Loading branch information
AndreaBrighi committed Jul 11, 2023
1 parent 17cd86d commit 5afd364
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ interface ReminderRemoteDataSource {
* @param email the email of the student.
* @param lesson the lesson.
* @param isbn the isbn of the book.
* @return the id of the reminder.
*/
suspend fun createNewReminderForLesson(email: String, lesson: Lesson, isbn: String): String
suspend fun createNewReminderForLesson(email: String, lesson: Lesson, isbn: String)

/**
* Deletes the reminder for the given lesson.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,9 @@ class ReminderRemoteDataSourceImpl(
)
}

override suspend fun createNewReminderForLesson(email: String, lesson: Lesson, isbn: String): String {
override suspend fun createNewReminderForLesson(email: String, lesson: Lesson, isbn: String) {
val response = calendarApi.createReminderForLesson(createJsonForReminder(email, lesson, isbn)).execute()
if (response.isSuccessful) {
return response.body()?.message ?: ""
} else {
if (!response.isSuccessful) {
throw DownloadException(ErrorHandler.getError(response))
}
}
Expand Down

0 comments on commit 5afd364

Please sign in to comment.