package com.yihu.hos.arbiter.controllers;

import com.yihu.hos.arbiter.services.ServiceFlowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @created Airhead 2016/8/16.
 */
@RestController
@RequestMapping("/serviceFlow")
public class ServiceFlowController {

    @Autowired
    private ServiceFlowService serviceFlowService;

    @RequestMapping(method = RequestMethod.POST)
    public void save(String serviceFlow) {
        serviceFlowService.save(serviceFlow);
    }

    @RequestMapping(method = RequestMethod.GET)
    public String get(String serviceFlow) {
        return serviceFlowService.get(serviceFlow);
    }

    @RequestMapping(method = RequestMethod.PUT)
    public String put(String serviceFlow, String clientInfo) {
        return serviceFlowService.put(serviceFlow, clientInfo);
    }
}
