package de.jottyfan.camporganizer.module.ical;

import java.io.IOException;

import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

/**
 *
 * @author jotty
 *
 */
@Controller
public class ICalController {

	@Autowired
	private IICalService service;

	/**
	 * generate the ical response stream
	 *
	 * @throws IOException on io errors
	 */
	@GetMapping("/ical")
	public void generate(HttpServletResponse response) throws IOException {
		service.generate(response);
	}
}
