package com.reyun.controller;

import com.reyun.repository.ConfigParamRepository;
import com.reyun.util.ResultModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by nolan on 06/06/2017.
 * description:
 */
@Controller
@RequestMapping("index")
public class IndexController {

    @Autowired
    ConfigParamRepository configParamRepository;

    @RequestMapping(value = "trackingio", method = RequestMethod.GET)
    @ResponseBody
    public ResultModel findUserIOUrl() {
        return ResultModel.OK(configParamRepository.findParamsByKey("trackingio_login_url"));
    }
}
