Skip to content

Commit

Permalink
add version
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-karan committed Mar 3, 2021
1 parent 06bee3f commit 022c126
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/doggo/api/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ type httpResp struct {
}

func handleIndexAPI(w http.ResponseWriter, r *http.Request) {
sendResponse(w, http.StatusOK, "Welcome to Doggo API.")
var (
app = r.Context().Value("app").(app.App)
)

sendResponse(w, http.StatusOK, fmt.Sprintf("Welcome to Doggo API. Version: %s", app.Version))
return
}

Expand Down

0 comments on commit 022c126

Please sign in to comment.