From ceb55704ebc60229ea5a260207dee6c8b323c1e0 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Tue, 10 May 2016 22:18:51 -0800 Subject: [PATCH] Consistency. --- .../com/beust/kobalt/app/remote/SparkServer.kt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/kotlin/com/beust/kobalt/app/remote/SparkServer.kt b/src/main/kotlin/com/beust/kobalt/app/remote/SparkServer.kt index 23132924..71e34391 100644 --- a/src/main/kotlin/com/beust/kobalt/app/remote/SparkServer.kt +++ b/src/main/kotlin/com/beust/kobalt/app/remote/SparkServer.kt @@ -70,22 +70,22 @@ class SparkServer(val initCallback: (String) -> List, val cleanUpCallba result }) jsonRoute("/v0/getTemplates", Route { request, response -> - TemplatesInfo.create(Templates().getTemplates(pluginInfo)) + TemplatesData.create(Templates().getTemplates(pluginInfo)) }) } } -class TemplateInfo(val pluginName: String, val templates: List) +class TemplateData(val pluginName: String, val templates: List) -class TemplatesInfo(val templates: List) { +class TemplatesData(val templates: List) { companion object { - fun create(map: ListMultimap) : TemplatesInfo { - val templateList = arrayListOf() + fun create(map: ListMultimap) : TemplatesData { + val templateList = arrayListOf() map.keySet().forEach { pluginName -> val list = map[pluginName].map { it.templateName } - templateList.add(TemplateInfo(pluginName, list)) + templateList.add(TemplateData(pluginName, list)) } - return TemplatesInfo(templateList) + return TemplatesData(templateList) } } }