Compare commits
2 Commits
dcfcd63f67
...
7fac75cdf6
Author | SHA1 | Date |
---|---|---|
|
7fac75cdf6 | |
|
a1f8e46fec |
|
@ -26,6 +26,7 @@ import (
|
|||
cloud2 "gitlink.org.cn/JointCloud/pcm-coordinator/pkg/models/cloud"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
@ -43,8 +44,8 @@ func NewContainerCreateLogic(ctx context.Context, svcCtx *svc.ServiceContext) *C
|
|||
}
|
||||
}
|
||||
|
||||
func (l *ContainerCreateLogic) ContainerCreate(req *container.CreateParam) (resp interface{}, err error) {
|
||||
|
||||
func (l *ContainerCreateLogic) ContainerCreate(req *container.CreateParam) (resp *ContainerCreateRespStruct, err error) {
|
||||
resp = &ContainerCreateRespStruct{}
|
||||
param := &cloud.CreateParam{
|
||||
Name: req.Name,
|
||||
Description: req.Description,
|
||||
|
@ -98,6 +99,10 @@ func (l *ContainerCreateLogic) ContainerCreate(req *container.CreateParam) (resp
|
|||
if tx.Error != nil {
|
||||
|
||||
}
|
||||
resp = taskModel.Id
|
||||
return
|
||||
resp.TaskId = strconv.FormatInt(taskModel.Id, 10)
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
type ContainerCreateRespStruct struct {
|
||||
TaskId string `json:"taskId"`
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue