Skip to content

Instantly share code, notes, and snippets.

@joshafeinberg
Created February 29, 2020 22:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshafeinberg/13e62e0a6ad40e1df5d4043a8087d8f5 to your computer and use it in GitHub Desktop.
Save joshafeinberg/13e62e0a6ad40e1df5d4043a8087d8f5 to your computer and use it in GitHub Desktop.
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