Add cell debug page.
This makes it much easier to troubleshoot information related to a cell by showing detailed data about a single cell. At this point much is a placeholder, but we at least get the cell boundary coordinates and a map. This also starts to make some code common around doing things like mapping.
This commit is contained in:
parent
7c2d7eef25
commit
c0b527c9a3
9 changed files with 465 additions and 48 deletions
15
endpoint.go
15
endpoint.go
|
|
@ -36,6 +36,21 @@ func getArcgisOauthCallback(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
http.Redirect(w, r, BaseURL+"/", http.StatusFound)
|
||||
}
|
||||
|
||||
func getCellDetails(w http.ResponseWriter, r *http.Request, user *models.User) {
|
||||
cell_str := chi.URLParam(r, "cell")
|
||||
if cell_str == "" {
|
||||
respondError(w, "There should always be a cell", nil, http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
cell, err := HexToInt64(cell_str)
|
||||
if err != nil {
|
||||
respondError(w, "Cannot convert provided cell to uint64", err, http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
htmlCell(r.Context(), w, user, cell)
|
||||
}
|
||||
|
||||
func getFavicon(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-type", "image/x-icon")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue