| Line 38... |
Line 38... |
| 38 |
CookiesProcessor cookiesProcessor;
|
38 |
CookiesProcessor cookiesProcessor;
|
| 39 |
|
39 |
|
| 40 |
@RequestMapping(value = "/register", method = RequestMethod.GET)
|
40 |
@RequestMapping(value = "/register", method = RequestMethod.GET)
|
| 41 |
public String registerIndex(HttpServletRequest request, Model model) throws Throwable{
|
41 |
public String registerIndex(HttpServletRequest request, Model model) throws Throwable{
|
| 42 |
LoginDetails details = cookiesProcessor.getCookiesObject(request);
|
42 |
LoginDetails details = cookiesProcessor.getCookiesObject(request);
|
| - |
|
43 |
FofoForm form = Mongo.getFofoForm(details.getEmailId());
|
| - |
|
44 |
if (form != null) {
|
| 43 |
model.addAttribute("email", details.getEmailId());
|
45 |
model.addAttribute("email", details.getEmailId());
|
| 44 |
return "fofo-form";
|
46 |
return "fofo-form";
|
| - |
|
47 |
} else {
|
| - |
|
48 |
return "fofo-thankyou";
|
| - |
|
49 |
}
|
| 45 |
}
|
50 |
}
|
| 46 |
|
51 |
|
| 47 |
@RequestMapping(value = "/register", method = RequestMethod.POST)
|
52 |
@RequestMapping(value = "/register", method = RequestMethod.POST)
|
| 48 |
public String registerIndex(HttpServletRequest request, @RequestBody FofoForm fofoForm ,Model model) throws Throwable{
|
53 |
public String registerIndex(HttpServletRequest request, @RequestBody FofoForm fofoForm ,Model model) throws Throwable{
|
| 49 |
Mongo.persistFofoRegInfo(fofoForm);
|
54 |
Mongo.persistFofoRegInfo(fofoForm);
|