Last active
January 27, 2022 10:32
-
-
Save JaniKibichi/7ed51d1c8038d5ec106e7a1d27890d71 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