Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions backend/src/validation/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,3 @@ def validate_timestamp_start_date_before_end_date(startDate, endDate):
raise HTTPException(
status_code=400, detail="endDate must be after startDate")
return endDate


def validate_temperature_timestamp_in_range(start, end):
min_timestamp = -946771200 # 01/01/1940
max_timestamp = int(time.time()) # now
print(end)
print(max_timestamp)
if (start < min_timestamp or end > max_timestamp):
raise HTTPException(
status_code=400, detail=f"Timestamp must be between {min_timestamp} and {max_timestamp}")
elif end <= start:
raise HTTPException(
status_code=400, detail="endDate must be after startDate")
return end
Loading
Loading