package cd.casic.ci.api;

import cd.casic.ci.process.process.service.docker.DockerService;
import cd.casic.framework.commons.pojo.CommonResult;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/docker")
public class DockerController {
    @Resource
    private DockerService dockerService;
    @GetMapping("/imageListByResourceId/{resourceId}")
    public CommonResult<List<String>> imageListByResourceId(@PathVariable String resourceId){
        return CommonResult.success(dockerService.imageListByResourceId(resourceId));
    }
}
