|
|
@@ -22,7 +22,7 @@ import java.util.List;
|
|
|
*/
|
|
|
@Tag(name = "Docker 仓库接口")
|
|
|
@RestController
|
|
|
-@RequestMapping("/api/devops/docker/registry")
|
|
|
+@RequestMapping("/api/devops/docker")
|
|
|
public class DockerRegistryController {
|
|
|
private final DockerRegistryRepository dockerRegistryRepository;
|
|
|
private final DockerRegistryService dockerRegistryService;
|
|
|
@@ -35,7 +35,7 @@ public class DockerRegistryController {
|
|
|
}
|
|
|
|
|
|
@Operation(summary = "DockerRegistry 列表页面", description = "N")
|
|
|
- @GetMapping("")
|
|
|
+ @GetMapping("/registry")
|
|
|
public String repoAuthPage(@RequestParam("pn") int pageNumber) {
|
|
|
PageRequest pageRequest = PageRequest.of(pageNumber-1, pageSize);
|
|
|
Page<DockerRegistry> page = dockerRegistryRepository.findAll(pageRequest);
|
|
|
@@ -52,14 +52,14 @@ public class DockerRegistryController {
|
|
|
}
|
|
|
|
|
|
@Operation(summary = "添加 DockerRegistry 配置", description = "N")
|
|
|
- @PostMapping(value = "", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
+ @PostMapping(value = "/registry", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
public String addOrUpdateRepoConfig(@Validated DockerAuth dockerAuth) {
|
|
|
dockerRegistryService.addOrUpdate(dockerAuth);
|
|
|
return WebResult.success();
|
|
|
}
|
|
|
|
|
|
@Operation(summary = "删除 DockerRegistry 配置", description = "N")
|
|
|
- @PostMapping(value = "/delete", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
+ @PostMapping(value = "/registry/delete", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
public String deleteRepoConfig(Integer id) {
|
|
|
dockerRegistryService.delete(id);
|
|
|
return WebResult.success();
|