Skip to content

Commit

Permalink
convert inner api responses to string (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmikey authored Mar 30, 2023
1 parent c43bfa0 commit eaed545
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"net/http"
"strconv"
"time"

"github.com/labstack/echo/v4"
Expand Down Expand Up @@ -53,7 +54,7 @@ func (a *API) Install(ctx echo.Context) error {

// return inner code as body
return ctx.JSON(200, map[string]interface{}{
"code": status,
"code": strconv.Itoa(status),
})

// Work done.
Expand All @@ -67,7 +68,7 @@ func (a *API) Install(ctx echo.Context) error {
}

return ctx.JSON(http.StatusOK, map[string]interface{}{
"code": http.StatusOK,
"code": strconv.Itoa(http.StatusOK),
})

}

0 comments on commit eaed545

Please sign in to comment.