Created
June 19, 2021 18:18
-
-
Save JaniKibichi/da1fe51322aeb1855690eba611a9cc4a to your computer and use it in GitHub Desktop.
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
package com.janikibichi.api | |
object RestAPI{ | |
// 1. STORE MENU | |
def storeMenu(languageMenu:LanguageMenu):Future[MenuUpdate]={ | |
val languageMenuActor = actorSystem.actorOf(LanguageMenuProtocol.props(languageMenu.language)) | |
(languageMenuActor ? languageMenu).mapTo[MenuUpdate] | |
} | |
// 2. PROCESS USSD REQUEST | |
def processPostUssdRequest(ussdRequest:USSDRequest):Future[USSDMenu]={ | |
val ussdActor = actorSystem.actorOf(USSDFSMProtocol.props(ussdRequest.sessionId)) | |
(ussdActor ? ussdRequest).mapTo[USSDMenu] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment