Skip to content

Commit b04e219

Browse files
committed
add return
1 parent 4b4026b commit b04e219

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

routers/api/packages/container/container.go

+4
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,19 @@ func Authenticate(ctx *context.Context) {
148148
task, err := actions_model.GetTaskByID(ctx, ctx.Data["ActionsTaskID"].(int64))
149149
if err != nil {
150150
apiError(ctx, http.StatusInternalServerError, err)
151+
return
151152
}
152153
if err := task.LoadJob(ctx); err != nil {
153154
apiError(ctx, http.StatusInternalServerError, err)
155+
return
154156
}
155157
if err := task.Job.LoadRun(ctx); err != nil {
156158
apiError(ctx, http.StatusInternalServerError, err)
159+
return
157160
}
158161
if err := task.Job.Run.LoadTriggerUser(ctx); err != nil {
159162
apiError(ctx, http.StatusInternalServerError, err)
163+
return
160164
}
161165

162166
u = task.Job.Run.TriggerUser

0 commit comments

Comments
 (0)