Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PODS-9662 simple change of making srn #1243

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
6cb566a
PODS-9662 simple change of making srn
srinivasulumunagalahmrc Sep 9, 2024
4beec5c
PODS-9662 simple change of making srn
srinivasulumunagalahmrc Sep 9, 2024
6045a35
PODS-9662 simple change of making srn
srinivasulumunagalahmrc Sep 10, 2024
969512d
PODS-9662 simple change of making srn
srinivasulumunagalahmrc Sep 11, 2024
6fd79cd
Revert "PODS-9662 simple change of making srn"
srinivasulumunagalahmrc Sep 11, 2024
f7dcbf7
PODS-9662 simple change of making srn
srinivasulumunagalahmrc Sep 11, 2024
9b35b44
PODS-9662 simple change of making srn
srinivasulumunagalahmrc Sep 11, 2024
8730704
Revert "PODS-9662 simple change of making srn"
srinivasulumunagalahmrc Sep 13, 2024
5f0e414
PODS-9662 simple change of making srn work
srinivasulumunagalahmrc Sep 13, 2024
c15d995
PODS-9662 simple change of making srn work
srinivasulumunagalahmrc Sep 13, 2024
0743535
PODS-9662 simple change of making srn work
srinivasulumunagalahmrc Sep 13, 2024
1e894a5
PODS-9662 simple change of making srn work
srinivasulumunagalahmrc Sep 15, 2024
eaedb24
PODS-9662 simple change of making srn work
srinivasulumunagalahmrc Sep 17, 2024
d3112b2
PODS-9662 simple change of making srn work
srinivasulumunagalahmrc Sep 17, 2024
01680a9
PODS-9662 simple change of making srn work
srinivasulumunagalahmrc Sep 17, 2024
a507e90
PODS-9662 simple change of making srn work
srinivasulumunagalahmrc Sep 17, 2024
94bdab4
PODS-9662 simple change of making srn work
srinivasulumunagalahmrc Sep 17, 2024
338111d
Revert "PODS-9662 simple change of making srn work"
srinivasulumunagalahmrc Sep 18, 2024
67f7f1f
PODS-9662 simple change of making srn work
srinivasulumunagalahmrc Sep 18, 2024
e0406c3
PODS-9662 simple change of making srn work
srinivasulumunagalahmrc Sep 18, 2024
6b7a016
Merge remote-tracking branch 'origin/main' into PODS-9662-simpler
srinivasulumunagalahmrc Sep 25, 2024
01b3471
PODS-9662 merge from main
srinivasulumunagalahmrc Sep 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
25 changes: 13 additions & 12 deletions app/connectors/PensionSchemeVarianceLockConnector.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,24 @@ import uk.gov.hmrc.http.HttpClient

import scala.concurrent.{ExecutionContext, Future}
import scala.util.{Failure, Try}
import models.SchemeReferenceNumber

@ImplementedBy(classOf[PensionSchemeVarianceLockConnectorImpl])
trait PensionSchemeVarianceLockConnector {

def lock(psaId: String, srn: String)
def lock(psaId: String, srn: SchemeReferenceNumber)
(implicit hc: HeaderCarrier, ec: ExecutionContext): Future[Lock]

def getLock(psaId: String, srn: String)
def getLock(psaId: String, srn: SchemeReferenceNumber)
(implicit hc: HeaderCarrier, ec: ExecutionContext): Future[Option[SchemeVariance]]

def getLockByPsa(psaId: String)
(implicit hc: HeaderCarrier, ec: ExecutionContext): Future[Option[SchemeVariance]]

def isLockByPsaIdOrSchemeId(psaId: String, srn: String)
def isLockByPsaIdOrSchemeId(psaId: String, srn: SchemeReferenceNumber)
(implicit hc: HeaderCarrier, ec: ExecutionContext): Future[Option[Lock]]

def releaseLock(psaId: String, srn: String)
def releaseLock(psaId: String, srn: SchemeReferenceNumber)
(implicit hc: HeaderCarrier, ec: ExecutionContext): Future[Unit]

}
Expand All @@ -56,10 +57,10 @@ class PensionSchemeVarianceLockConnectorImpl @Inject()(http: HttpClient, config:

private val logger = Logger(classOf[PensionSchemeVarianceLockConnectorImpl])

override def lock(psaId: String, srn: String)
override def lock(psaId: String, srn: SchemeReferenceNumber)
(implicit hc: HeaderCarrier, ec: ExecutionContext): Future[Lock] = {

implicit val headerCarrier: HeaderCarrier = hc.withExtraHeaders("psaId" -> psaId, "srn" -> srn)
implicit val headerCarrier: HeaderCarrier = hc.withExtraHeaders("psaId" -> psaId, "srn" -> srn.id)

val url = s"${config.updateSchemeDetailsUrl}/lock"

Expand All @@ -77,10 +78,10 @@ class PensionSchemeVarianceLockConnectorImpl @Inject()(http: HttpClient, config:
} andThen logExceptions("Unable to get the lock")
}

override def getLock(psaId: String, srn: String)
override def getLock(psaId: String, srn: SchemeReferenceNumber)
(implicit hc: HeaderCarrier, ec: ExecutionContext): Future[Option[SchemeVariance]] = {

implicit val headerCarrier: HeaderCarrier = hc.withExtraHeaders("psaId" -> psaId, "srn" -> srn)
implicit val headerCarrier: HeaderCarrier = hc.withExtraHeaders("psaId" -> psaId, "srn" -> srn.id)

val url = s"${config.updateSchemeDetailsUrl}/getLock"

Expand Down Expand Up @@ -124,10 +125,10 @@ class PensionSchemeVarianceLockConnectorImpl @Inject()(http: HttpClient, config:
}


override def isLockByPsaIdOrSchemeId(psaId: String, srn: String)
override def isLockByPsaIdOrSchemeId(psaId: String, srn: SchemeReferenceNumber)
(implicit hc: HeaderCarrier, ec: ExecutionContext): Future[Option[Lock]] = {

implicit val headerCarrier: HeaderCarrier = hc.withExtraHeaders("psaId" -> psaId, "srn" -> srn)
implicit val headerCarrier: HeaderCarrier = hc.withExtraHeaders("psaId" -> psaId, "srn" -> srn.id)

val url = s"${config.updateSchemeDetailsUrl}/isLockByPsaOrScheme"

Expand All @@ -151,10 +152,10 @@ class PensionSchemeVarianceLockConnectorImpl @Inject()(http: HttpClient, config:
case Failure(t: Throwable) => logger.error(msg, t)
}

override def releaseLock(psaId: String, srn: String)
override def releaseLock(psaId: String, srn: SchemeReferenceNumber)
(implicit hc: HeaderCarrier, ec: ExecutionContext): Future[Unit] = {

implicit val headerCarrier: HeaderCarrier = hc.withExtraHeaders("psaId" -> psaId, "srn" -> srn)
implicit val headerCarrier: HeaderCarrier = hc.withExtraHeaders("psaId" -> psaId, "srn" -> srn.id)

val url = s"${config.updateSchemeDetailsUrl}/release-lock"

Expand Down
7 changes: 4 additions & 3 deletions app/connectors/PensionsSchemeConnector.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import uk.gov.hmrc.http.{HttpClient, HttpResponse, HeaderCarrier}
import utils.{UserAnswers, HttpResponseHelper}

import scala.concurrent.{ExecutionContext, Future}
import models.SchemeReferenceNumber

@ImplementedBy(classOf[PensionsSchemeConnectorImpl])
trait PensionsSchemeConnector {
Expand All @@ -39,7 +40,7 @@ trait PensionsSchemeConnector {
def updateSchemeDetails(psaId: String, pstr: String, answers: UserAnswers)
(implicit hc: HeaderCarrier, ec: ExecutionContext): Future[Unit]

def checkForAssociation(userId: String, srn: String, isPsa: Boolean = true)
def checkForAssociation(userId: String, srn: SchemeReferenceNumber, isPsa: Boolean = true)
(implicit headerCarrier: HeaderCarrier,
ec: ExecutionContext, request: RequestHeader): Future[Either[HttpResponse, Boolean]]
}
Expand Down Expand Up @@ -84,11 +85,11 @@ class PensionsSchemeConnectorImpl @Inject()(http: HttpClient, config: FrontendAp
}
}

def checkForAssociation(userId: String, srn: String, isPsa: Boolean)
def checkForAssociation(userId: String, srn: SchemeReferenceNumber, isPsa: Boolean)
(implicit headerCarrier: HeaderCarrier,
ec: ExecutionContext, request: RequestHeader): Future[Either[HttpResponse, Boolean]] = {
val headers: Seq[(String, String)] =
Seq((if(isPsa) "psaId" else "pspId", userId), ("schemeReferenceNumber", srn), ("Content-Type", "application/json"))
Seq((if(isPsa) "psaId" else "pspId", userId), ("schemeReferenceNumber", srn.id), ("Content-Type", "application/json"))

implicit val hc: HeaderCarrier = headerCarrier.withExtraHeaders(headers: _*)

Expand Down
7 changes: 4 additions & 3 deletions app/connectors/SchemeDetailsConnector.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ import utils.{HttpResponseHelper, UserAnswers}

import scala.concurrent.{ExecutionContext, Future}
import scala.util.Failure
import models.SchemeReferenceNumber

@ImplementedBy(classOf[SchemeDetailsConnectorImpl])
trait SchemeDetailsConnector {
def getSchemeDetails(psaId: String, schemeIdType: String, idNumber: String, refreshData: Option[Boolean] = None)
(implicit hc: HeaderCarrier, ec: ExecutionContext): Future[UserAnswers]

def getPspSchemeDetails(pspId: String, srn: String, refreshData: Option[Boolean] = None)
def getPspSchemeDetails(pspId: String, srn: SchemeReferenceNumber, refreshData: Option[Boolean] = None)
(implicit hc: HeaderCarrier, ec: ExecutionContext): Future[UserAnswers]
}

Expand Down Expand Up @@ -65,11 +66,11 @@ class SchemeDetailsConnectorImpl @Inject()(http: HttpClient, config: FrontendApp
}
}

override def getPspSchemeDetails(pspId: String, srn: String, refreshData: Option[Boolean])
override def getPspSchemeDetails(pspId: String, srn: SchemeReferenceNumber, refreshData: Option[Boolean])
(implicit hc: HeaderCarrier, ec: ExecutionContext): Future[UserAnswers] = {

val url = config.pspSchemeDetailsUrl
val schemeHc = hc.withExtraHeaders("srn" -> srn,
val schemeHc = hc.withExtraHeaders("srn" -> srn.id,
"pspId" -> pspId,
"refreshData" -> refreshData.map(_.toString).getOrElse("false"))

Expand Down
5 changes: 3 additions & 2 deletions app/controllers/AnyMoreChangesController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import utils.annotations.Variations
import views.html.anyMoreChanges

import scala.concurrent.{ExecutionContext, Future}
import models.SchemeReferenceNumber

class AnyMoreChangesController @Inject()(appConfig: FrontendAppConfig,
override val messagesApi: MessagesApi,
Expand All @@ -51,13 +52,13 @@ class AnyMoreChangesController @Inject()(appConfig: FrontendAppConfig,
private val form: Form[Boolean] = formProvider()
private val postCall = controllers.routes.AnyMoreChangesController.onSubmit _

def onPageLoad(srn: Option[String]): Action[AnyContent] = (authenticate() andThen getData(UpdateMode, srn) andThen
def onPageLoad(srn: Option[SchemeReferenceNumber]): Action[AnyContent] = (authenticate() andThen getData(UpdateMode, srn) andThen
allowAccess(srn) andThen requireData).async {
implicit request =>
Future.successful(Ok(view(form, existingSchemeName, dateToCompleteDeclaration, postCall(srn), srn)))
}

def onSubmit(srn: Option[String]): Action[AnyContent] = (authenticate() andThen getData(UpdateMode, srn) andThen
def onSubmit(srn: Option[SchemeReferenceNumber]): Action[AnyContent] = (authenticate() andThen getData(UpdateMode, srn) andThen
requireData).async {
implicit request =>
form.bindFromRequest().fold(
Expand Down
7 changes: 4 additions & 3 deletions app/controllers/BenefitsSecuredByInsuranceController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import utils.annotations.{AboutBenefitsAndInsurance, InsuranceService}
import views.html.benefitsSecuredByInsurance

import scala.concurrent.{ExecutionContext, Future}
import models.SchemeReferenceNumber

class BenefitsSecuredByInsuranceController @Inject()(appConfig: FrontendAppConfig,
override val messagesApi: MessagesApi,
Expand All @@ -48,9 +49,9 @@ class BenefitsSecuredByInsuranceController @Inject()(appConfig: FrontendAppConfi
)(implicit val executionContext: ExecutionContext) extends
FrontendBaseController with I18nSupport with Retrievals {

val postCall: (Mode, Option[String]) => Call = routes.BenefitsSecuredByInsuranceController.onSubmit
val postCall: (Mode, Option[SchemeReferenceNumber]) => Call = routes.BenefitsSecuredByInsuranceController.onSubmit

def onPageLoad(mode: Mode, srn: Option[String]): Action[AnyContent] =
def onPageLoad(mode: Mode, srn: Option[SchemeReferenceNumber]): Action[AnyContent] =
(authenticate() andThen getData(mode, srn) andThen allowAccess(srn) andThen requireData).async {
implicit request =>
SchemeNameId.retrieve.map { schemeName =>
Expand All @@ -64,7 +65,7 @@ class BenefitsSecuredByInsuranceController @Inject()(appConfig: FrontendAppConfi

private def form(schemeName: String)(implicit messages: Messages): Form[Boolean] = formProvider(schemeName)

def onSubmit(mode: Mode, srn: Option[String]): Action[AnyContent] = (authenticate() andThen getData(mode, srn)
def onSubmit(mode: Mode, srn: Option[SchemeReferenceNumber]): Action[AnyContent] = (authenticate() andThen getData(mode, srn)
andThen requireData).async {
implicit request =>
SchemeNameId.retrieve.map { schemeName =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,20 @@ class CheckYourAnswersBeforeYouStartController @Inject()(override val messagesAp
FrontendBaseController
with Enumerable.Implicits with I18nSupport with Retrievals {

def onPageLoad(mode: Mode, srn: Option[String]): Action[AnyContent] =
def onPageLoad(mode: Mode, srn: Option[SchemeReferenceNumber]): Action[AnyContent] =
(authenticate() andThen getData(mode, srn) andThen allowAccess(srn) andThen requireData).async {
implicit request =>

Future.successful(Ok(view(vm(mode, srn))))
}

def pspOnPageLoad(srn: String): Action[AnyContent] =
def pspOnPageLoad(srn: SchemeReferenceNumber): Action[AnyContent] =
(authenticate(Some(PSP)) andThen getPspData(srn) andThen allowAccess(Some(srn), allowPsa = true, allowPsp = true) andThen requireData).async {
implicit request =>
Future.successful(Ok(view(vm(UpdateMode, Some(srn)))))
}

private def vm(mode: Mode, srn: Option[String])(implicit request: DataRequest[AnyContent]): CYAViewModel = {
private def vm(mode: Mode, srn: Option[SchemeReferenceNumber])(implicit request: DataRequest[AnyContent]): CYAViewModel = {
implicit val userAnswers: UserAnswers = request.userAnswers

val beforeYouStart = AnswerSection(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import views.html.checkYourAnswers

import javax.inject.Inject
import scala.concurrent.ExecutionContext
import models.SchemeReferenceNumber

class CheckYourAnswersBenefitsAndInsuranceController @Inject()(override val messagesApi: MessagesApi,
authenticate: AuthAction,
Expand All @@ -48,19 +49,19 @@ class CheckYourAnswersBenefitsAndInsuranceController @Inject()(override val mess
extends FrontendBaseController
with Enumerable.Implicits with I18nSupport with Retrievals {

def onPageLoad(mode: Mode, srn: Option[String]): Action[AnyContent] =
def onPageLoad(mode: Mode, srn: Option[SchemeReferenceNumber]): Action[AnyContent] =
(authenticate() andThen getData(mode, srn) andThen allowAccess(srn) andThen requireData) {
implicit request =>
Ok(view(vm(mode, srn)))
}

def pspOnPageLoad(srn: String): Action[AnyContent] =
def pspOnPageLoad(srn: SchemeReferenceNumber): Action[AnyContent] =
(authenticate(Some(PSP)) andThen getPspData(srn) andThen allowAccess(Some(srn), allowPsa = true, allowPsp = true) andThen requireData) {
implicit request =>
Ok(view(vm(UpdateMode, Some(srn))))
}

private def vm(mode: Mode, srn: Option[String])(implicit request: DataRequest[AnyContent]): CYAViewModel = {
private def vm(mode: Mode, srn: Option[SchemeReferenceNumber])(implicit request: DataRequest[AnyContent]): CYAViewModel = {

implicit val userAnswers: UserAnswers = request.userAnswers
val benefitsAndInsuranceSection = AnswerSection(
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/CheckYourAnswersMembersController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ class CheckYourAnswersMembersController @Inject()(override val messagesApi: Mess
FrontendBaseController
with Enumerable.Implicits with I18nSupport with Retrievals {

def onPageLoad(mode: Mode, srn: Option[String]): Action[AnyContent] =
def onPageLoad(mode: Mode, srn: Option[SchemeReferenceNumber]): Action[AnyContent] =
(authenticate() andThen getData(mode, srn) andThen allowAccess(srn) andThen requireData).async {
implicit request =>
Future.successful(Ok(view(vm(mode, srn))))
}

def pspOnPageLoad(srn: String): Action[AnyContent] =
def pspOnPageLoad(srn: SchemeReferenceNumber): Action[AnyContent] =
(authenticate(Some(PSP)) andThen getPspData(srn) andThen allowAccess(Some(srn), allowPsa = true, allowPsp = true) andThen requireData).async {
implicit request =>
Future.successful(Ok(view(vm(UpdateMode, Some(srn)))))
}

private def vm(mode: Mode, srn: Option[String])(implicit request: DataRequest[AnyContent]): CYAViewModel = {
private def vm(mode: Mode, srn: Option[SchemeReferenceNumber])(implicit request: DataRequest[AnyContent]): CYAViewModel = {
implicit val userAnswers: UserAnswers = request.userAnswers
val membersSection = AnswerSection(
None,
Expand Down
7 changes: 4 additions & 3 deletions app/controllers/DeleteSchemeChangesController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendBaseController
import views.html.deleteSchemeChanges

import scala.concurrent.{ExecutionContext, Future}
import models.SchemeReferenceNumber

class DeleteSchemeChangesController @Inject()(
appConfig: FrontendAppConfig,
Expand All @@ -49,7 +50,7 @@ class DeleteSchemeChangesController @Inject()(
private lazy val postCall = routes.DeleteSchemeChangesController.onSubmit _
private val form: Form[Boolean] = formProvider()

def onPageLoad(srn: String): Action[AnyContent] = (authenticate() andThen getData()).async {
def onPageLoad(srn: SchemeReferenceNumber): Action[AnyContent] = (authenticate() andThen getData()).async {
implicit request =>
request.psaId match {
case Some(psaId) =>
Expand All @@ -61,7 +62,7 @@ class DeleteSchemeChangesController @Inject()(
}
}

private def getSchemeName(srn: String, psaId: String)(block: (String, String) => Future[Result])
private def getSchemeName(srn: SchemeReferenceNumber, psaId: String)(block: (String, String) => Future[Result])
(implicit hc: HeaderCarrier): Future[Result] =
minimalPsaConnector.getPsaNameFromPsaID(psaId).flatMap { psaName =>
updateConnector.fetch(srn).flatMap { data =>
Expand All @@ -78,7 +79,7 @@ class DeleteSchemeChangesController @Inject()(
}
}

def onSubmit(srn: String): Action[AnyContent] = (authenticate() andThen getData()).async {
def onSubmit(srn: SchemeReferenceNumber): Action[AnyContent] = (authenticate() andThen getData()).async {
implicit request =>
request.psaId.map { psaId =>
getSchemeName(srn, psaId.id) { (psaName, schemeName) =>
Expand Down
5 changes: 3 additions & 2 deletions app/controllers/InsuranceCompanyNameController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import utils.annotations.{AboutBenefitsAndInsurance, InsuranceService}
import views.html.insuranceCompanyName

import scala.concurrent.{ExecutionContext, Future}
import models.SchemeReferenceNumber

class InsuranceCompanyNameController @Inject()(appConfig: FrontendAppConfig,
override val messagesApi: MessagesApi,
Expand All @@ -50,15 +51,15 @@ class InsuranceCompanyNameController @Inject()(appConfig: FrontendAppConfig,

private val form = formProvider()

def onPageLoad(mode: Mode, srn: Option[String]): Action[AnyContent] = (authenticate() andThen getData(mode, srn)
def onPageLoad(mode: Mode, srn: Option[SchemeReferenceNumber]): Action[AnyContent] = (authenticate() andThen getData(mode, srn)
andThen allowAccess(srn)) {
implicit request =>
val preparedForm = request.userAnswers.flatMap(_.get(InsuranceCompanyNameId)).fold(form)(v => form.fill(v))
val submitCall: Call = controllers.routes.InsuranceCompanyNameController.onSubmit(mode, srn)
Ok(view(preparedForm, mode, existingSchemeName, submitCall, srn))
}

def onSubmit(mode: Mode, srn: Option[String]): Action[AnyContent] = (authenticate() andThen getData(mode, srn)
def onSubmit(mode: Mode, srn: Option[SchemeReferenceNumber]): Action[AnyContent] = (authenticate() andThen getData(mode, srn)
andThen requireData).async {
implicit request =>
form.bindFromRequest().fold(
Expand Down
7 changes: 4 additions & 3 deletions app/controllers/InsurancePolicyNumberController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import utils.annotations.{AboutBenefitsAndInsurance, InsuranceService}
import views.html.insurancePolicyNumber

import scala.concurrent.{ExecutionContext, Future}
import models.SchemeReferenceNumber

class InsurancePolicyNumberController @Inject()(appConfig: FrontendAppConfig,
override val messagesApi: MessagesApi,
Expand All @@ -50,7 +51,7 @@ class InsurancePolicyNumberController @Inject()(appConfig: FrontendAppConfig,

private val form = formProvider()

def onPageLoad(mode: Mode, srn: Option[String]): Action[AnyContent] =
def onPageLoad(mode: Mode, srn: Option[SchemeReferenceNumber]): Action[AnyContent] =
(authenticate() andThen getData(mode, srn) andThen allowAccess(srn) andThen requireData).async {
implicit request =>

Expand All @@ -63,9 +64,9 @@ class InsurancePolicyNumberController @Inject()(appConfig: FrontendAppConfig,
Future.successful(Ok(view(preparedForm, mode, companyName, existingSchemeName, postCall(mode, srn), srn)))
}

def postCall: (Mode, Option[String]) => Call = routes.InsurancePolicyNumberController.onSubmit
def postCall: (Mode, Option[SchemeReferenceNumber]) => Call = routes.InsurancePolicyNumberController.onSubmit

def onSubmit(mode: Mode, srn: Option[String]): Action[AnyContent] = (authenticate() andThen getData(mode, srn)
def onSubmit(mode: Mode, srn: Option[SchemeReferenceNumber]): Action[AnyContent] = (authenticate() andThen getData(mode, srn)
andThen requireData).async {
implicit request =>
form.bindFromRequest().fold(
Expand Down
Loading