Skip to content
Snippets Groups Projects
Commit 21408745 authored by Felipe D'Abrantes's avatar Felipe D'Abrantes
Browse files

Add test endpoints to simulate other microservices

parent cac3e219
No related branches found
No related tags found
1 merge request!14Add endpoints to manage Dailies
package controllers
import javax.inject._
import play.api.mvc._
import play.api.libs.json.{JsString, JsArray}
import play.api.libs.json.JsBoolean
/**
* This controller creates an `Action` to handle HTTP requests to the
* application's test page.
*/
@Singleton
class TestController @Inject()(val controllerComponents: ControllerComponents) extends BaseController {
def getFriends() = Action {
println("TestController:getFriends")
val response = JsArray(
Seq(
JsString("641128f7e80bcd1ba39d04ae"),
JsString("641128f7e80bcd1ba39d04af"),
JsString("641128f7e80bcd1ba39d04aa")
)
)
Ok(response)
}
def verifyUser() = Action {
Ok(JsBoolean(true))
}
}
...@@ -20,3 +20,8 @@ POST /daily/create controllers.DailyController.create() ...@@ -20,3 +20,8 @@ POST /daily/create controllers.DailyController.create()
PUT /daily/like controllers.DailyController.like() PUT /daily/like controllers.DailyController.like()
PUT /daily/unlike controllers.DailyController.unlike() PUT /daily/unlike controllers.DailyController.unlike()
GET /test/getFriends controllers.TestController.getFriends()
GET /test/verifyUser controllers.TestController.verifyUser()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment