Pretty all the things I missed
My laptop didn't have lefthook running. Oops.
This commit is contained in:
parent
f60bde7fd9
commit
4bbfbdb9e6
30 changed files with 490 additions and 487 deletions
22
sync/cell.go
22
sync/cell.go
|
|
@ -38,15 +38,15 @@ func getCellDetails(ctx context.Context, r *http.Request, user platform.User) (*
|
|||
return nil, nhttp.NewError("Failed to get inspections by cell: %w", err)
|
||||
}
|
||||
/*
|
||||
center, err := h3.Cell(c).LatLng()
|
||||
if err != nil {
|
||||
return nil, nhttp.NewError("Failed to get center: %w", err)
|
||||
}
|
||||
geojson, err := h3utils.H3ToGeoJSON([]h3.Cell{h3.Cell(c)})
|
||||
if err != nil {
|
||||
return nil, nhttp.NewError("Failed to get boundaries: %w", err)
|
||||
}
|
||||
resolution := h3.Cell(c).Resolution()
|
||||
center, err := h3.Cell(c).LatLng()
|
||||
if err != nil {
|
||||
return nil, nhttp.NewError("Failed to get center: %w", err)
|
||||
}
|
||||
geojson, err := h3utils.H3ToGeoJSON([]h3.Cell{h3.Cell(c)})
|
||||
if err != nil {
|
||||
return nil, nhttp.NewError("Failed to get boundaries: %w", err)
|
||||
}
|
||||
resolution := h3.Cell(c).Resolution()
|
||||
*/
|
||||
sources, err := platform.BreedingSourcesByCell(ctx, user.Organization, h3.Cell(c))
|
||||
if err != nil {
|
||||
|
|
@ -65,7 +65,7 @@ func getCellDetails(ctx context.Context, r *http.Request, user platform.User) (*
|
|||
BreedingSources: sources,
|
||||
CellBoundary: boundary,
|
||||
Inspections: inspections,
|
||||
Traps: traps,
|
||||
Treatments: treatments,
|
||||
Traps: traps,
|
||||
Treatments: treatments,
|
||||
}), nil
|
||||
}
|
||||
|
|
|
|||
14
sync/dash.go
14
sync/dash.go
|
|
@ -21,8 +21,8 @@ type contentSource struct {
|
|||
User platform.User
|
||||
}
|
||||
type contentTrap struct {
|
||||
Trap platform.Trap
|
||||
User platform.User
|
||||
Trap platform.Trap
|
||||
User platform.User
|
||||
}
|
||||
type contentLayoutTest struct {
|
||||
User platform.User
|
||||
|
|
@ -71,7 +71,7 @@ func getSource(ctx context.Context, r *http.Request, user platform.User) (*html.
|
|||
}
|
||||
treatment_models := platform.ModelTreatment(treatments)
|
||||
data := contentSource{
|
||||
Inspections: inspections,
|
||||
Inspections: inspections,
|
||||
Source: s,
|
||||
Traps: traps,
|
||||
Treatments: treatments,
|
||||
|
|
@ -99,10 +99,10 @@ func getTrap(ctx context.Context, r *http.Request, user platform.User) (*html.Re
|
|||
return nil, nhttp.NewError("Failed to get trap: %w", err)
|
||||
}
|
||||
/*
|
||||
latlng, err := t.H3Cell.LatLng()
|
||||
if err != nil {
|
||||
return nil, nhttp.NewError("Failed to get latlng: %w", err)
|
||||
}
|
||||
latlng, err := t.H3Cell.LatLng()
|
||||
if err != nil {
|
||||
return nil, nhttp.NewError("Failed to get latlng: %w", err)
|
||||
}
|
||||
*/
|
||||
data := contentTrap{
|
||||
Trap: *t,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
package sync
|
||||
|
||||
import (
|
||||
)
|
||||
import ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue