small updates in test webapp, to make response data (fake) changing its timestamp (calculates now and returns it in the rest response)
small updates in test webapp, to make response data (fake) changing its timestamp (calculates now and returns it in the rest response)

package grails.angularjs.resources.test

import grails.converters.JSON


class RestSampleController 
{

    def index() 
	{
		log.info("index - params: $params")

		def sampleJSonResponse = [
			id:1, 
			controller:'RestSampleController', 
			method:null, 
			message:'Hello from Grails in JSON format', 
			timestamp: new java.util.Date().format("yyyy-MM-dd HH:mm:ss.SSS"), 
			// timestamp: new java.util.Date().format("yyyy-MM-dd\'T\'HH:mm:ss.SSSZ"), 
			status:'OK'
		]

		// render(view: "index")
		// render Product.list() as JSON
		render sampleJSonResponse as JSON
	}

}

package grails.angularjs.resources.test

import grails.converters.JSON


class RestSampleController 
{

	def sampleJSonResponse = [
		id:1, 
		controller:'RestSampleController', 
		method:null, 
		message:'Hello from Grails in JSON format', 
		timestamp: new java.util.Date().format("yyyy-MM-dd HH:mm:ss.SSS"), 
		// timestamp: new java.util.Date().format("yyyy-MM-dd\'T\'HH:mm:ss.SSSZ"), 
		status:'OK'
	]

    def index() 
	{
		log.info("index - params: $params")

		// render(view: "index")
		// render Product.list() as JSON
		render sampleJSonResponse as JSON
	}

}
