Skip to content

Commit 917e7e2

Browse files
authored
Update action.go (github commit bug)
1 parent 6d2d2e3 commit 917e7e2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

routers/api/v1/repo/action.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ func (Action) CreateOrUpdateSecret(ctx *context.APIContext) {
138138
opt := web.GetForm(ctx).(*api.CreateOrUpdateSecretOption)
139139

140140
_, created, err := secret_service.CreateOrUpdateSecret(ctx, 0, repo.ID, ctx.PathParam("secretname"), opt.Data, opt.Description)
141+
if err != nil {
141142
if errors.Is(err, util.ErrInvalidArgument) {
142143
ctx.APIError(http.StatusBadRequest, err)
143144
} else if errors.Is(err, util.ErrNotExist) {

0 commit comments

Comments
 (0)