Skip to content

Commit

Permalink
33 bug coordinates for some buildings are rounding (#34)
Browse files Browse the repository at this point in the history
* change building coords to float64 from float32

* changed auth token requirement on wayfinding end points to client.Standard
  • Loading branch information
clint156 authored Nov 9, 2023
1 parent a43692b commit 5dbbfb2
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 18 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]
### Added
- Prepare for deployment in OpenShift [#28](https://github.com/rokwire/gateway-building-block/issues/28)
- removed assets directory from .gitignore for laundry location data
- changed datatype of lat/long build coordinates to long 64
- changed auth token type expected by wayfining endpoints from client.auth to client.standard

## [2.0.7] - 2023-05-05
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The API documentation is available here: https://api.rokwire.illinois.edu/gatewa

MongoDB v4.2.2+

Go v1.16+
Go v1.21+

### Environment variables
The following Environment variables are supported. The service will not start unless those marked as Required are supplied.
Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
Patches for **Gateway Building Block** in this repository will only be applied to the following versions:
| Version | Supported |
| ------- | ------------------ |
| 2.0.8 | :white_check_mark: |
| < 2.0.8 | :x: |
| 2.0.12 | :white_check_mark: |
| < 2.0.12| :x: |

## Reporting a Bug or Vulnerability

Expand Down
Binary file added __debug_bin2707182646
Binary file not shown.
8 changes: 4 additions & 4 deletions core/model/buildings.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ type Entrance struct {
ADACompliant bool
Available bool
ImageURL string
Latitude float32
Longitude float32
Latitude float64
Longitude float64
}

// Building represents the information returned when a requst for a building's details is made
Expand All @@ -48,6 +48,6 @@ type Building struct {
ImageURL string
MailCode string
Entrances []Entrance
Latitude float32
Longitude float32
Latitude float64
Longitude float64
}
8 changes: 4 additions & 4 deletions core/model/uiuc/buildingdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ type CampusEntrance struct {
ADACompliant bool `json:"is_ada_compliant"`
Available bool `json:"is_available_for_use"`
ImageURL string `json:"image"`
Latitude float32 `json:"latitude"`
Longitude float32 `json:"longitude"`
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
}

// CampusBuilding represents a campus specific building
Expand All @@ -43,8 +43,8 @@ type CampusBuilding struct {
ImageURL string `json:"image"`
MailCode string `json:"mailcode"`
Entrances []CampusEntrance `json:"entrances"`
Latitude float32 `json:"building_centroid_latitude"`
Longitude float32 `json:"building_centroid_longitude"`
Latitude float64 `json:"building_centroid_latitude"`
Longitude float64 `json:"building_centroid_longitude"`
}

// ServerResponse represents a UIUC specific server response
Expand Down
6 changes: 3 additions & 3 deletions driver/web/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ func (a Adapter) Start() {
mainRouter.HandleFunc("/laundry/initrequest", a.wrapFunc(a.clientAPIsHandler.initServiceRequest, a.auth.client.User)).Methods("GET")
mainRouter.HandleFunc("/laundry/reqeustservice", a.wrapFunc(a.clientAPIsHandler.submitServiceRequest, nil)).Methods("GET")

mainRouter.HandleFunc("/wayfinding/building", a.wrapFunc(a.clientAPIsHandler.getBuilding, a.auth.client.User)).Methods("GET")
mainRouter.HandleFunc("/wayfinding/entrance", a.wrapFunc(a.clientAPIsHandler.getEntrance, a.auth.client.User)).Methods("GET")
mainRouter.HandleFunc("/wayfinding/buildings", a.wrapFunc(a.clientAPIsHandler.getBuildings, a.auth.client.User)).Methods("GET")
mainRouter.HandleFunc("/wayfinding/building", a.wrapFunc(a.clientAPIsHandler.getBuilding, a.auth.client.Standard)).Methods("GET")
mainRouter.HandleFunc("/wayfinding/entrance", a.wrapFunc(a.clientAPIsHandler.getEntrance, a.auth.client.Standard)).Methods("GET")
mainRouter.HandleFunc("/wayfinding/buildings", a.wrapFunc(a.clientAPIsHandler.getBuildings, a.auth.client.Standard)).Methods("GET")

mainRouter.HandleFunc("/person/contactinfo", a.wrapFunc(a.clientAPIsHandler.getContactInfo, a.auth.client.User)).Methods("GET")
mainRouter.HandleFunc("/courses/giescourses", a.wrapFunc(a.clientAPIsHandler.getGiesCourses, a.auth.client.User)).Methods("GET")
Expand Down
1 change: 1 addition & 0 deletions driver/web/client_permission_policy.csv
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
p, get_examples, /gateway/api/examples/*, (GET), Get examples
p, get_buildings, /gateway/api/wayfinding/*, (GET), Get buildings
2 changes: 1 addition & 1 deletion driver/web/docs/gen/def.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: 3.0.3
info:
title: Rokwire Gateway Building Block API
description: Gateway Building Block API Documentation
version: 2.0.7
version: 2.0.12
servers:
- url: 'https://api.rokwire.illinois.edu/gateway'
description: Production server
Expand Down
2 changes: 1 addition & 1 deletion driver/web/docs/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: 3.0.3
info:
title: Rokwire Gateway Building Block API
description: Gateway Building Block API Documentation
version: 2.0.7
version: 2.0.12
servers:
- url: 'https://api.rokwire.illinois.edu/gateway'
description: Production server
Expand Down

0 comments on commit 5dbbfb2

Please sign in to comment.