Commit a855dd72 authored by sapn1s's avatar sapn1s
Browse files

Pass calendar name

parent 07c4abd6
......@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import com.example.calendar.models.Calendar;
import com.example.calendar.models.Event;
import com.example.calendar.models.StatHelper;
import com.example.calendar.helpers.StatHelper;
import com.example.calendar.models.User;
import com.example.calendar.repo.CalendarRepo;
import com.example.calendar.repo.EventRepo;
......@@ -125,7 +125,7 @@ public class GraphController {
@GetMapping(value = "/choose-cal")
public String chooseCalGet(Model model, StatHelper statHelper)
public String chooseCalGet(Model model, StatHelper statHelper, String calName)
{
User currUser = findCurrentUser();
......@@ -156,8 +156,9 @@ public class GraphController {
}
@PostMapping(value ="/choose-cal")
public String chooseCalPost(Model models, StatHelper statHelper)
{
public String chooseCalPost(Model models, StatHelper statHelper, String calName)
{
statHelper.setChosenCalendar(calName);
System.out.println(statHelper);
return "redirect:/stat";
}
......
package com.example.calendar.models;
package com.example.calendar.helpers;
public class StatHelper {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment