Skip to content

Commit

Permalink
testing fix for temp unit not coming through properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
matteius committed Oct 2, 2024
1 parent f73886f commit 1503d52
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions opensensor/collection_apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
auth,
device_id_is_allowed_for_user,
get_api_keys_by_device_id,
get_user_from_fief_user,
migration_complete,
reduce_api_keys_to_device_ids,
validate_environment,
Expand All @@ -53,15 +52,15 @@
}

new_collections = {
"Temperature": "temp",
"temp": "temp",
"Humidity": "rh",
"Pressure": "pressure",
"Lux": "lux",
"CO2": "ppm_CO2",
"pH": "pH",
"Moisture": "moisture_readings",
"LiquidLevel": "liquid",
"RelayBoard": "relays",
"liquid": "liquid",
"relays": "relays",
}

environment_translation = {
Expand Down Expand Up @@ -522,12 +521,8 @@ async def historical_data_route(
detail=f"User {fief_user} is not authorized to access device {device_id}",
)

# TODO - Refactor this after migration to FreeTier complete
user = get_user_from_fief_user(fief_user)
if user:
collection_name = user.collection_name
else:
collection_name = "FreeTier"
# TODO - Refactor this to support paid collections
collection_name = "FreeTier"

return sample_and_paginate_collection(
entity,
Expand Down

0 comments on commit 1503d52

Please sign in to comment.