mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 08:19:15 +08:00
fix: 解决自动升级导致的代码问题 (#2733)
This commit is contained in:
parent
fe1290e933
commit
824476992b
@ -19,7 +19,7 @@ func (u *ContainerService) PageVolume(req dto.SearchWithPage) (int64, interface{
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, nil, err
|
return 0, nil, err
|
||||||
}
|
}
|
||||||
list, err := client.VolumeList(context.TODO(), filters.NewArgs())
|
list, err := client.VolumeList(context.TODO(), volume.ListOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, nil, err
|
return 0, nil, err
|
||||||
}
|
}
|
||||||
@ -76,7 +76,7 @@ func (u *ContainerService) ListVolume() ([]dto.Options, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
list, err := client.VolumeList(context.TODO(), filters.NewArgs())
|
list, err := client.VolumeList(context.TODO(), volume.ListOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -113,7 +113,7 @@ func (u *ContainerService) CreateVolume(req dto.VolumeCreate) error {
|
|||||||
}
|
}
|
||||||
var array []filters.KeyValuePair
|
var array []filters.KeyValuePair
|
||||||
array = append(array, filters.Arg("name", req.Name))
|
array = append(array, filters.Arg("name", req.Name))
|
||||||
vos, _ := client.VolumeList(context.TODO(), filters.NewArgs(array...))
|
vos, _ := client.VolumeList(context.TODO(), volume.ListOptions{})
|
||||||
if len(vos.Volumes) != 0 {
|
if len(vos.Volumes) != 0 {
|
||||||
for _, v := range vos.Volumes {
|
for _, v := range vos.Volumes {
|
||||||
if v.Name == req.Name {
|
if v.Name == req.Name {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user