Skip to content

Commit

Permalink
Merge branch 'develop' into DDO-3317
Browse files Browse the repository at this point in the history
  • Loading branch information
knapii-developments authored Nov 27, 2023
2 parents 2429470 + d8e5052 commit fdb51e9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ object Dependencies {
// END transitive dependency overrides

// elasticsearch requires log4j, but we redirect log4j to logback
"org.apache.logging.log4j" % "log4j-to-slf4j" % "2.21.1",
"org.apache.logging.log4j" % "log4j-to-slf4j" % "2.22.0",
"ch.qos.logback" % "logback-classic" % "1.4.11",
"com.getsentry.raven" % "raven-logback" % "8.0.3", // TODO: this should be io.sentry / sentry-logback instead
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.5",
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.1.4")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.1.5")

addSbtPlugin("io.spray" % "sbt-revolver" % "0.10.0")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ class RegisterService(val rawlsDao: RawlsDAO, val samDao: SamDAO, val thurloeDao
def createUserWithProfile(userInfo: UserInfo, registerRequest: RegisterRequest): Future[PerRequestMessage] =
for {
registerResult <- registerUser(userInfo, registerRequest.acceptsTermsOfService)
_ <- thurloeDao.saveProfile(userInfo, registerRequest.profile)
_ <- thurloeDao.saveKeyValues(userInfo, Map("isRegistrationComplete" -> Profile.currentVersion.toString))
// We are using the equivalent value from sam registration to force the order of operations for the thurloe calls
registrationResultUserInfo = userInfo.copy(userEmail = registerResult.email.value)
_ <- thurloeDao.saveProfile(registrationResultUserInfo, registerRequest.profile)
_ <- thurloeDao.saveKeyValues(registrationResultUserInfo, Map("isRegistrationComplete" -> Profile.currentVersion.toString))
_ <- if (!registerResult.allowed) {
thurloeDao.saveKeyValues(userInfo, Map("email" -> userInfo.userEmail))
thurloeDao.saveKeyValues(registrationResultUserInfo, Map("email" -> userInfo.userEmail))
} else Future.successful()
} yield RequestComplete(StatusCodes.OK, registerResult)

Expand Down

0 comments on commit fdb51e9

Please sign in to comment.