Created
July 4, 2019 01:08
-
-
Save juliuscanute/ff6e35970ffe3dee4a0babd6e4f112bc to your computer and use it in GitHub Desktop.
Dictionary Controller
This file contains hidden or 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 DictionaryController : KoinComponent { | |
| private val repository: RepositoryInterface by inject() | |
| fun getNumberOfPagesInDictionary(): Any { | |
| return try { | |
| repository.getNumberOfPagesInDictionary() | |
| } catch (e: PageRetrievalException) { | |
| ErrorMesssage(message = e.errorMessage, type = ErrorType.PAGE_RETRIVAL_ERROR) | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment