diff --git a/backend-services/feed-service/app/controllers/DailyController.scala b/backend-services/feed-service/app/controllers/DailyController.scala index 69c00c4eb94fdc9bd5328067d10ee3f2a19a9f86..d75dc30de56d292fb6e449d2692798c3251890c3 100644 --- a/backend-services/feed-service/app/controllers/DailyController.scala +++ b/backend-services/feed-service/app/controllers/DailyController.scala @@ -5,7 +5,7 @@ import play.api.mvc._ import play.api.libs.json.{JsValue, JsLookupResult} import models.{Daily} -import models.actions.{AuthenticatedUserAction} +import models.actions.{AuthenticatedUserAction, AuthenticationRequest} import models.exceptions.{ConflictException, NotFoundException, InvalidRequestBodyException, InvalidQueryParameterException} import scala.concurrent.TimeoutException @@ -79,7 +79,7 @@ class DailyController @Inject()(val controllerComponents: ControllerComponents, /** * Create an Action to create a Daily. */ - def create() = Action { implicit request: Request[AnyContent] => + def create() = authenticatedUserAction { implicit request: AuthenticationRequest[AnyContent] => println("DailyController:create") try { @@ -98,7 +98,7 @@ class DailyController @Inject()(val controllerComponents: ControllerComponents, /** * Create an Action to like a Daily. */ - def like() = Action { implicit request: Request[AnyContent] => + def like() = authenticatedUserAction { implicit request: AuthenticationRequest[AnyContent] => println("DailyController:like") try { @@ -118,7 +118,7 @@ class DailyController @Inject()(val controllerComponents: ControllerComponents, /** * Create an Action to unlike a Daily. */ - def unlike() = Action { implicit request: Request[AnyContent] => + def unlike() = authenticatedUserAction { implicit request: AuthenticationRequest[AnyContent] => println("DailyController:unlike") try {