Closed franciscodr closed 7 years ago
PR's link: https://github.com/47deg/nine-cards-backend/pull/120
Branch: paco-878-using-eithert
nine-cards-backend
app by typing sbt -Dconfig.file=modules/api/src/main/resources/localhost.conf
rankApps
endpoint keeps working as expectedcurl -X "POST" "http://localhost:8080/applications/rank" \
-H "X-Auth-Token: 12345" \
-H "X-Android-ID: <enter-android-id>" \
-H "Content-Type: application/json" \
-H "X-Session-Token: <enter-session-token>" \
-d $'{
"location": "ES",
"items": {
"BOOKS_AND_REFERENCE": ["com.google.android.apps.books"],
"BUSINESS": ["com.google.android.apps.giant"],
"COMMUNICATION": ["com.google.android.talk", "com.google.android.gm", "com.motorola.targetnotif", "com.whatsapp", "com.Slack"],
"TRAVEL_AND_LOCAL": ["com.google.android.apps.maps"]
}
}'
Works fine, LGTM!
We should model known errors by using cats
EitherT
in the response of the services.