Skip to content

Commit

Permalink
Add observeObjectives() to BlazeRepository
Browse files Browse the repository at this point in the history
  • Loading branch information
irfano committed Sep 14, 2024
1 parent b49df1c commit 29424db
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ class BlazeRepository @Inject constructor(
const val WEEKLY_DURATION = 7 // Used to calculate weekly budget in endless campaigns
}

fun observeObjectives() = blazeCampaignsStore.observeBlazeCampaignObjectives().map {
it.map { objective -> Objective(objective.id, objective.title, objective.description) }
}

suspend fun fetchObjectives(): Result<Unit> {
val result = blazeCampaignsStore.fetchBlazeCampaignObjectives(selectedSite.get())

Expand Down

0 comments on commit 29424db

Please sign in to comment.