2020-02-20 23:39:46 +01:00
|
|
|
package click.poweronoff.satellite.api;
|
|
|
|
|
|
|
|
|
2020-02-24 22:31:13 +01:00
|
|
|
import click.poweronoff.satellite.domain.Feature;
|
|
|
|
import click.poweronoff.satellite.service.DataService;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
2020-02-20 23:39:46 +01:00
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
2020-02-24 22:31:13 +01:00
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
2020-02-20 23:39:46 +01:00
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
2020-02-24 22:31:13 +01:00
|
|
|
import java.util.List;
|
|
|
|
|
2020-02-20 23:39:46 +01:00
|
|
|
@Controller
|
|
|
|
public class FeaturesController {
|
2020-02-24 22:31:13 +01:00
|
|
|
|
|
|
|
@Autowired
|
|
|
|
DataService dataService;
|
|
|
|
|
|
|
|
@RequestMapping(value = "/features", method = RequestMethod.GET, produces = "application/json")
|
2020-02-20 23:39:46 +01:00
|
|
|
public @ResponseBody
|
2020-02-24 22:31:13 +01:00
|
|
|
List<Feature> features() {
|
|
|
|
return dataService.getAllFeatures();
|
2020-02-20 23:39:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|