MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / ApplyOnRelease

Method ApplyOnRelease

controller/publish/iml.go:55–71  ·  view source on GitHub ↗
(ctx *gin.Context, serviceId string, input *dto.ApplyOnReleaseInput)

Source from the content-addressed store, hash-verified

53}
54
55func (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
73func (c *imlPublishController) Apply(ctx *gin.Context, serviceId string, input *dto.ApplyInput) (*dto.Publish, error) {
74 apply, err := c.publishModule.Apply(ctx, serviceId, input)

Callers

nothing calls this directly

Calls 2

CreateMethod · 0.65
ApplyMethod · 0.65

Tested by

no test coverage detected