Skip to content

Commit 198edde

Browse files
committed
refactor: remove unused authenticateUser code
1 parent 1e4b9a7 commit 198edde

3 files changed

Lines changed: 4 additions & 10 deletions

File tree

app/controllers/AuctionController.scala

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ class AuctionController @Inject() (
1818
)(implicit ec: ExecutionContext, mat: Materializer)
1919
extends BaseController {
2020

21-
def authenticateUser: Action[AnyContent] = Action { implicit request =>
22-
Ok("User authenticated").withSession("user" -> "test_user")
23-
}
24-
2521
def getAuctions(page: Int, pageSize: Int): Action[AnyContent] = Action.async {
2622
implicit request: Request[AnyContent] =>
2723
val skip = (page - 1) * pageSize

app/controllers/UserController.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@ package controllers
33
import play.api.mvc._
44

55
import javax.inject.{Inject, Singleton}
6-
import scala.concurrent.ExecutionContext
76

87
@Singleton
98
class UserController @Inject() (
109
val controllerComponents: ControllerComponents
11-
)(implicit ec: ExecutionContext)
12-
extends BaseController {
10+
) extends BaseController {
1311

1412
def authenticateUser: Action[AnyContent] = Action { implicit request =>
15-
Ok("User authenticated").withSession("user" -> "testuser")
13+
Ok("User authenticated").withSession("user" -> "test_user")
1614
}
1715
}

conf/routes

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ GET /ws/auctions controllers.AuctionController.auctionsWebS
1414
GET /ws/future-auctions controllers.AuctionController.futureAuctionsWebSocket
1515
GET /ws/past-auctions controllers.AuctionController.pastAuctionsWebSocket
1616

17-
GET /authenticateUser controllers.UserController.authenticateUser
17+
GET /authenticate controllers.UserController.authenticateUser
1818
GET /ws-test.html controllers.Assets.at(path="/public", file="websocket_test.html")
1919

20-
GET /healthcheck controllers.HealthCheckController.healthCheck()
20+
GET /healthcheck controllers.HealthCheckController.healthCheck()

0 commit comments

Comments
 (0)