package com.style24.core.biz.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.style24.core.biz.thirdparty.KollusApi;
import com.style24.core.support.controller.TscBaseController;
import com.style24.persistence.domain.KollusResult;

import lombok.extern.slf4j.Slf4j;

/**
 * Kollus Upload Controller (카테노이드 동영상 업로드)
 *
 * @author gagamel
 * @since 2021. 4. 16
 */
@Controller
@RequestMapping("/kollus")
@Slf4j
public class TscKollusUploadController extends TscBaseController {

	@Autowired
	private KollusApi kollusApi;

	/**
	 * 동영상업로드 URL 조회
	 * @param cateNm - 카테고리명(Goods:상품, Review:리뷰, Display: 전시)
	 * @return 동영상 업로드 URL 정보
	 * @author gagamel
	 * @since 2021. 4. 16
	 */
	@PostMapping("/video/upload/url/{cateNm}")
	@ResponseBody
	public KollusResult getVideoUploadUrl(@PathVariable String cateNm) {
		return kollusApi.getVideoUploadUrl(cateNm);
	}

}
