Skip to content

Commit

Permalink
Merge pull request #20 from go-vela/bug/logs
Browse files Browse the repository at this point in the history
Fix database calls to capture logs
  • Loading branch information
jbrockopp authored Nov 12, 2019
2 parents 2df077b + 52223ba commit bae8eb5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func CreateServiceLog(c *gin.Context) {
}

// send API call to capture the created log
l, _ := database.FromContext(c).GetServiceLog(input.GetServiceID())
l, _ := database.FromContext(c).GetServiceLog(s.GetID())

c.JSON(http.StatusCreated, l)
}
Expand Down Expand Up @@ -142,7 +142,7 @@ func UpdateServiceLog(c *gin.Context) {
}

// send API call to capture the updated log
l, _ = database.FromContext(c).GetServiceLog(l.GetID())
l, _ = database.FromContext(c).GetServiceLog(s.GetID())

c.JSON(http.StatusOK, l)
}
Expand Down Expand Up @@ -201,7 +201,7 @@ func CreateStepLog(c *gin.Context) {
}

// send API call to capture the created log
l, _ := database.FromContext(c).GetStepLog(input.GetStepID())
l, _ := database.FromContext(c).GetStepLog(s.GetID())

c.JSON(http.StatusCreated, l)
}
Expand Down Expand Up @@ -269,7 +269,7 @@ func UpdateStepLog(c *gin.Context) {
}

// send API call to capture the updated log
l, _ = database.FromContext(c).GetStepLog(l.GetID())
l, _ = database.FromContext(c).GetStepLog(s.GetID())

c.JSON(http.StatusOK, l)
}
Expand Down

0 comments on commit bae8eb5

Please sign in to comment.