Skip to content

Commit

Permalink
Implement remove meal plan
Browse files Browse the repository at this point in the history
  • Loading branch information
hieuwu committed Apr 29, 2024
1 parent 396c0a4 commit 9965189
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ interface MealPlanRepository {
)

suspend fun retrieveMealByType(type: String, weekDayValue: String): List<MealModel>
suspend fun removeMealFromPlan(id: String)
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,12 @@ class MealPlanRepositoryImpl @Inject constructor(
}
return result
}

override suspend fun removeMealFromPlan(id: String) {
postgrest["meal_plans"].delete {
filter {
eq("id", id)
}
}
}
}

0 comments on commit 9965189

Please sign in to comment.