@RequestMapping(value = "/add_post", method = RequestMethod.POST)
	public @ResponseBody
	List<PostInfo> add(@RequestBody PostInfo postInfo) throws Exception {

		int flag = 0;
		AnalysisResult analResult = new AnalysisResult();
		// flag = this.userDao.check_user(postInfo.getUser_name());

		// if (flag == 1) {
		analResult = this.skyttleClient.analyzeText(postInfo.getPost_text());
		postInfo.setEmo_score(analResult.getEmoScore());
		postInfo.setPost_terms(analResult.getKeywords());
		if (postInfo.getPost_terms() != null
				&& postInfo.getPost_terms().size() != 0) {
			String term_list = "";
			for (int i = 0; i < postInfo.getPost_terms().size(); i++) {
				if (i == 0)
					term_list = postInfo.getPost_terms().get(i);
				else
					term_list = term_list + ","
							+ postInfo.getPost_terms().get(i);
			}
			postInfo.setPost_terms_list(term_list);
		}

		String format = "yyyy-MM-dd HH:mm:ss";
		SimpleDateFormat sdf = new SimpleDateFormat(format);
		String date_mysql = sdf.format(new Date());
		postInfo.setTimestamp(date_mysql);

		postInfo = this.postDao.addPost(postInfo);
		// }

		List<PostInfo> post_info_list = new ArrayList<PostInfo>();

		post_info_list = this.postDao.getBlogPosts(postInfo);
		String term_list = "";
		for (int i = 0; i < post_info_list.size(); i++) {
			if (post_info_list.get(i).getPost_terms_list() != null) {
				term_list = post_info_list.get(i).getPost_terms_list();
				if (term_list.contains(",")) {
					String[] terms_array = term_list.split(",");
					post_info_list.get(i).setPost_terms(
							Arrays.asList(terms_array));
				} else {
					List terms = new ArrayList();
					terms.add(term_list);
					post_info_list.get(i).setPost_terms(terms);
				}
			} else {
				List terms = new ArrayList();
				terms.add(term_list);
				post_info_list.get(i).setPost_terms(terms);
			}
		}

		Calculator cal = new Calculator();
		ArrayList<Integer> scores = new ArrayList<Integer>();
		for (int i = 0; i < post_info_list.size(); i++) {
			scores.add(post_info_list.get(i).getEmo_score());
		}
		if (cal.needsHelp(scores))
			SendGridClient.sendInvitation();
		return post_info_list;
	}