| 53 | } |
| 54 | |
| 55 | func (c *imlPublishController) ApplyOnRelease(ctx *gin.Context, serviceId string, input *dto.ApplyOnReleaseInput) (*dto.Publish, error) { |
| 56 | newReleaseId, err := c.releaseModule.Create(ctx, serviceId, &dto2.CreateInput{ |
| 57 | Version: input.Version, |
| 58 | Remark: input.VersionRemark, |
| 59 | }) |
| 60 | if err != nil { |
| 61 | return nil, err |
| 62 | } |
| 63 | apply, err := c.publishModule.Apply(ctx, serviceId, &dto.ApplyInput{ |
| 64 | Release: newReleaseId, |
| 65 | Remark: input.PublishRemark, |
| 66 | }) |
| 67 | if err != nil { |
| 68 | return nil, err |
| 69 | } |
| 70 | return apply, nil |
| 71 | } |
| 72 | |
| 73 | func (c *imlPublishController) Apply(ctx *gin.Context, serviceId string, input *dto.ApplyInput) (*dto.Publish, error) { |
| 74 | apply, err := c.publishModule.Apply(ctx, serviceId, input) |