Skip to content

Commit

Permalink
Fix response when no sandboxes are running
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubno committed Feb 8, 2024
1 parent 624c04d commit e09015d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.63
0.0.64
4 changes: 3 additions & 1 deletion packages/api/internal/handlers/sandboxes_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func (a *APIStore) GetSandboxes(c *gin.Context) {
c.JSON(http.StatusOK, sandboxes)
}

func (a *APIStore) GetSandboxesWithoutResponse(c *gin.Context) (sandboxes []api.RunningSandboxes) {
func (a *APIStore) GetSandboxesWithoutResponse(c *gin.Context) []api.RunningSandboxes {
ctx := c.Request.Context()

team := c.Value(constants.TeamContextKey).(models.Team)
Expand All @@ -29,6 +29,8 @@ func (a *APIStore) GetSandboxesWithoutResponse(c *gin.Context) (sandboxes []api.
properties := a.GetPackageToPosthogProperties(&c.Request.Header)
CreateAnalyticsTeamEvent(a.posthog, team.ID.String(), "listed running instances", properties)

sandboxes := make([]api.RunningSandboxes, 0)

for _, info := range instanceInfo {
if *info.TeamID != team.ID {
continue
Expand Down

0 comments on commit e09015d

Please sign in to comment.