Created
February 29, 2020 22:51
-
-
Save joshafeinberg/13e62e0a6ad40e1df5d4043a8087d8f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class WeightController(kodein: Kodein) : KodeinController(kodein), WeightService { | |
private val repository: WeightRepository by instance() | |
override suspend fun getWeights(): List<Weight> { | |
return repository.list() | |
} | |
override suspend fun postWeight(body: Weight) { | |
repository.addWeight(body) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment