/**
 * 
 */
package org.mynonglam.controllers;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.mynonglam.dao.AlbumDAO;
import org.mynonglam.entitys.Album;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.google.gson.Gson;

/**
 * @author Dao
 *
 */
@Controller
public class Test {

	/**
	 * 
	 */
	public Test() {
		// TODO Auto-generated constructor stub
	}
	
	@RequestMapping(value = "test", method = RequestMethod.POST)
	public @ResponseBody Map<String, String> test() {
		Map<String, String> result = new HashMap<String, String>();
		result.put("result", "True"); 
		return result;
	}
	
	@RequestMapping(value = "test1", method = RequestMethod.POST)
	public @ResponseBody String test1() {
		String result = "null";
		
//		List<Album> a = new AlbumDAO().getAlbumsView("dlduynam@gmail.com");
//		
//		result = new Gson().toJson(a);
//		System.out.println(result);
		
		return result;
	}
	
}
