package com.letionik.matinee.controller;

import com.letionik.matinee.EventDto;
import com.letionik.matinee.TaskProgressDto;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Alexey Zyabkin on 12.12.2015.
 */
@RestController
@RequestMapping(value = "/event")
public class EventController {
    @RequestMapping(method = RequestMethod.GET, name = "/current")
    public EventDto getCurrentEvent() {
        return new EventDto();
    }

    @RequestMapping(method = RequestMethod.POST, value = "/enroll/{code}")
    public EventDto enroll(@PathVariable String code) {
        return new EventDto();
    }

    @RequestMapping(value = "/reveal/tasks/{eventId}", method = RequestMethod.POST)
    public EventDto revealTasks() {
        return new EventDto();
    }

    @RequestMapping(value = "/reveal/roles/{eventId}", method = RequestMethod.POST)
    public EventDto revealRoles() {
        return new EventDto();
    }

    @RequestMapping(value = "/history/{eventId}", method = RequestMethod.GET)
    public List<TaskProgressDto> getHistory() {
        return new ArrayList<>();
    }
}
@@ -169,208 +169,9 @@
 ion.
-PathVariable;%0Aimport org.springframework.web.bind.annotation.RequestMapping;%0Aimport org.springframework.web.bind.annotation.RequestMethod;%0Aimport org.springframework.web.bind.annotation.RestController
+*
 ;%0A%0Ai
@@ -314,17 +314,16 @@
 alue = %22
-/
 event%22)%0A
@@ -353,16 +353,17 @@
 oller %7B%0A
+%0A
     @Req
@@ -366,32 +366,52 @@
 @RequestMapping(
+value = %22/current%22, 
 method = Request
@@ -424,27 +424,8 @@
 .GET
-, name = %22/current%22
 )%0A  
@@ -1014,17 +1014,16 @@
 alue = %22
-/
 history/
@@ -1106,16 +1106,44 @@
 History(
+@PathVariable String eventId
 ) %7B%0A    

fix eventController current