mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-05 04:56:02 +01:00
Upgrade scalatra-forms to 0.2.0 to solve performance issue
This commit is contained in:
@@ -49,7 +49,7 @@ object MyBuild extends Build {
|
|||||||
"org.scalatra" %% "scalatra-specs2" % ScalatraVersion % "test",
|
"org.scalatra" %% "scalatra-specs2" % ScalatraVersion % "test",
|
||||||
"org.scalatra" %% "scalatra-json" % ScalatraVersion,
|
"org.scalatra" %% "scalatra-json" % ScalatraVersion,
|
||||||
"org.json4s" %% "json4s-jackson" % "3.2.11",
|
"org.json4s" %% "json4s-jackson" % "3.2.11",
|
||||||
"jp.sf.amateras" %% "scalatra-forms" % "0.1.0",
|
"jp.sf.amateras" %% "scalatra-forms" % "0.2.0",
|
||||||
"commons-io" % "commons-io" % "2.4",
|
"commons-io" % "commons-io" % "2.4",
|
||||||
"io.github.gitbucket" % "markedj" % "1.0.5-SNAPSHOT",
|
"io.github.gitbucket" % "markedj" % "1.0.5-SNAPSHOT",
|
||||||
"org.apache.commons" % "commons-compress" % "1.9",
|
"org.apache.commons" % "commons-compress" % "1.9",
|
||||||
|
|||||||
@@ -300,9 +300,8 @@ trait RepositorySettingsControllerBase extends ControllerBase {
|
|||||||
|
|
||||||
private def webhookEvents = new ValueType[Set[WebHook.Event]]{
|
private def webhookEvents = new ValueType[Set[WebHook.Event]]{
|
||||||
def convert(name: String, params: Map[String, String], messages: Messages): Set[WebHook.Event] = {
|
def convert(name: String, params: Map[String, String], messages: Messages): Set[WebHook.Event] = {
|
||||||
val map = params.toSeq.toMap // TODO This transformation will be unnecessary after upgrading to scalatra 2.4 and scalatra-forms 0.2
|
|
||||||
WebHook.Event.values.flatMap { t =>
|
WebHook.Event.values.flatMap { t =>
|
||||||
map.get(name + "." + t.name).map(_ => t)
|
params.get(name + "." + t.name).map(_ => t)
|
||||||
}.toSet
|
}.toSet
|
||||||
}
|
}
|
||||||
def validate(name: String, params: Map[String, String], messages: Messages): Seq[(String, String)] = if(convert(name,params,messages).isEmpty){
|
def validate(name: String, params: Map[String, String], messages: Messages): Seq[(String, String)] = if(convert(name,params,messages).isEmpty){
|
||||||
|
|||||||
Reference in New Issue
Block a user