Working auth and photo json endpoint

Signed-off-by: Kris Nóva <kris@nivenly.com>
This commit is contained in:
Kris Nóva 2021-02-09 11:17:06 -08:00
parent ef275f97f4
commit e4323b6047
2032 changed files with 821464 additions and 52 deletions

28
vendor/github.com/paulmach/go.geojson/boundingbox.go generated vendored Normal file
View file

@ -0,0 +1,28 @@
package geojson
import "fmt"
func decodeBoundingBox(bb interface{}) ([]float64, error) {
if bb == nil {
return nil, nil
}
switch f := bb.(type) {
case []float64:
return f, nil
case []interface{}:
bb := make([]float64, 0, 4)
for _, v := range f {
switch c := v.(type) {
case float64:
bb = append(bb, c)
default:
return nil, fmt.Errorf("bounding box coordinate not usable, got %T", v)
}
}
return bb, nil
default:
return nil, fmt.Errorf("bounding box property not usable, got %T", bb)
}
}