Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Commit

Permalink
Quick fix: fail gracefully now that R25 is no more (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
cappadona authored Jul 30, 2020
1 parent 23d301d commit a73f3b9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion utils/r25.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,12 @@ const r25 = {
const response = await axios.$get(url)

// All we care about is the array of reservations
return response.space_reservations.space_reservation
// REVIEW: quick fix to fail gracefully now that R25 has been decommissioned
if (typeof response === 'object') {
return response.space_reservations.space_reservation
} else {
return false
}
},
isR25: function (location, category) {
return schema.locations[location].categories[category].r25
Expand Down

0 comments on commit a73f3b9

Please sign in to comment.