diff --git a/learningpath-api/src/main/scala/no/ndla/learningpathapi/db/migrationwithdependencies/V31__ArenaDefaultEnabledOrgs.scala b/learningpath-api/src/main/scala/no/ndla/learningpathapi/db/migrationwithdependencies/V31__ArenaDefaultEnabledOrgs.scala index 72c4a43db3..d423887486 100644 --- a/learningpath-api/src/main/scala/no/ndla/learningpathapi/db/migrationwithdependencies/V31__ArenaDefaultEnabledOrgs.scala +++ b/learningpath-api/src/main/scala/no/ndla/learningpathapi/db/migrationwithdependencies/V31__ArenaDefaultEnabledOrgs.scala @@ -25,7 +25,7 @@ class V31__ArenaDefaultEnabledOrgs(properties: LearningpathApiProperties) extend def insertConfig(implicit session: DBSession): Unit = { val document = Json.obj( - "key" -> Json.fromString("MY_NDLA_ENABLED_ORGS"), + "key" -> Json.fromString("ARENA_ENABLED_ORGS"), "value" -> Json.obj("value" -> Json.fromValues(orgs.map(Json.fromString))), "updatedAt" -> NDLADate.now().asJson, "updatedBy" -> Json.fromString("System") diff --git a/learningpath-api/src/main/scala/no/ndla/learningpathapi/model/domain/config/ConfigKey.scala b/learningpath-api/src/main/scala/no/ndla/learningpathapi/model/domain/config/ConfigKey.scala index bba90a216c..64b694d271 100644 --- a/learningpath-api/src/main/scala/no/ndla/learningpathapi/model/domain/config/ConfigKey.scala +++ b/learningpath-api/src/main/scala/no/ndla/learningpathapi/model/domain/config/ConfigKey.scala @@ -14,7 +14,7 @@ sealed abstract class ConfigKey(override val entryName: String) extends EnumEntr object ConfigKey extends Enum[ConfigKey] with CirceEnum[ConfigKey] { case object LearningpathWriteRestricted extends ConfigKey("LEARNINGPATH_WRITE_RESTRICTED") case object MyNDLAWriteRestricted extends ConfigKey("MY_NDLA_WRITE_RESTRICTED") - case object MyNDLAEnabledOrgs extends ConfigKey("MY_NDLA_ENABLED_ORGS") + case object ArenaEnabledOrgs extends ConfigKey("ARENA_ENABLED_ORGS") val values: IndexedSeq[ConfigKey] = findValues diff --git a/learningpath-api/src/main/scala/no/ndla/learningpathapi/model/domain/config/ConfigMeta.scala b/learningpath-api/src/main/scala/no/ndla/learningpathapi/model/domain/config/ConfigMeta.scala index 545dd37579..95448d3875 100644 --- a/learningpath-api/src/main/scala/no/ndla/learningpathapi/model/domain/config/ConfigMeta.scala +++ b/learningpath-api/src/main/scala/no/ndla/learningpathapi/model/domain/config/ConfigMeta.scala @@ -90,7 +90,7 @@ case class ConfigMeta( def validate: Try[ConfigMeta] = key match { case ConfigKey.LearningpathWriteRestricted => validateBooleanKey(ConfigKey.LearningpathWriteRestricted) case ConfigKey.MyNDLAWriteRestricted => validateBooleanKey(ConfigKey.MyNDLAWriteRestricted) - case ConfigKey.MyNDLAEnabledOrgs => validateStringListKey(ConfigKey.MyNDLAEnabledOrgs) + case ConfigKey.ArenaEnabledOrgs => validateStringListKey(ConfigKey.ArenaEnabledOrgs) } } diff --git a/learningpath-api/src/main/scala/no/ndla/learningpathapi/service/ReadService.scala b/learningpath-api/src/main/scala/no/ndla/learningpathapi/service/ReadService.scala index 0d7db2ad11..12ab7ad5c4 100644 --- a/learningpath-api/src/main/scala/no/ndla/learningpathapi/service/ReadService.scala +++ b/learningpath-api/src/main/scala/no/ndla/learningpathapi/service/ReadService.scala @@ -214,7 +214,7 @@ trait ReadService { def getMyNDLAEnabledOrgs: Try[List[String]] = { Try { configRepository - .getConfigWithKey(ConfigKey.MyNDLAEnabledOrgs) + .getConfigWithKey(ConfigKey.ArenaEnabledOrgs) .map(_.value) .collectFirst { case domain.config.StringListValue(value) => value } .getOrElse(List.empty) diff --git a/learningpath-api/src/main/scala/no/ndla/learningpathapi/service/UpdateService.scala b/learningpath-api/src/main/scala/no/ndla/learningpathapi/service/UpdateService.scala index ed9f5d1510..6ba2930e97 100644 --- a/learningpath-api/src/main/scala/no/ndla/learningpathapi/service/UpdateService.scala +++ b/learningpath-api/src/main/scala/no/ndla/learningpathapi/service/UpdateService.scala @@ -829,7 +829,7 @@ trait UpdateService { user: TokenUser ): Try[api.MyNDLAUser] = { feideId match { - case None => Failure(ValidationException("feideId", "You need to supply either feideId to update a user.")) + case None => Failure(ValidationException("feideId", "You need to supply a feideId to update a user.")) case Some(id) => for { existing <- getMyNDLAUserOrFail(id)