package ru.yandex.canvas.controllers.video;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;

import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(path = "/video/media_groups")
@Validated
public class VideoMediaGroupsController {
    /*
    @RequestMapping(path = "/media_groups", method = RequestMethod.PUT)
    public ResponseEntity<?> saveMediaGroups(
            @RequestParam("MediaGroupId") String mediaGroupId,
            @RequestParam("MediaGroupName") String mediaGroupName,
            @RequestParam("VideoDirectGroupId") Long videoDirectGroupId,
            @RequestParam("VideoDirectGroupId") Long videoDirectGroupName)
    {
        return ResponseEntity.ok(new Object());
    }*/

    @RequestMapping(value = "/**", method = {RequestMethod.GET, RequestMethod.POST, RequestMethod.PUT})
    public ResponseEntity route(HttpServletRequest request) throws IOException {
        return PythonRedirect.route(request);
    }

}
