Skip to content

Commit

Permalink
refactor: cancel request if appName is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Siumauricio committed Jan 5, 2025
1 parent 007ba05 commit 5417308
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/golang/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ func main() {
limitNum = 50
}

if appName == "" {
return c.JSON([]database.ContainerMetric{})
}

var metrics []database.ContainerMetric
if appName != "" {
metrics, err = db.GetContainerMetrics(appName, limitNum)
Expand Down

0 comments on commit 5417308

Please sign in to comment.