浏览代码

fix fortune test

Damien Solimando 9 年之前
父节点
当前提交
e62e4b3d43
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      frameworks/Groovy/hot/shows/example.show.groovy

+ 1 - 2
frameworks/Groovy/hot/shows/example.show.groovy

@@ -56,8 +56,8 @@ rest.get('/queries/mongodb').then { req ->
 rest.get('/fortunes/mongodb').then {
 
 	mongo.Fortune.find().promise().then { fortunes ->
+		
 		fortunes << [_id:'0.', message:'Additional fortune added at request time.']
-	}.then { fortunes ->
 		fortunes.each {
 			it._id = Float.parseFloat(it._id) as Integer
 			if (it.message.contains('<script>'))
@@ -70,7 +70,6 @@ rest.get('/fortunes/mongodb').then {
 			response += "<tr><td>${it._id}</td><td>${it.message}</td></tr>"
 		}
 		response += templateTail
-		println response
 		new hot.Response(200,['Content-Type':'text/html'], response)
 	}
 }