Skip to content

Commit

Permalink
add image to fitness
Browse files Browse the repository at this point in the history
  • Loading branch information
vcai122 committed Sep 13, 2023
1 parent 06b125d commit c0a6121
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backend/penndata/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ def get(self, request):
datetime.time(hour=int(hours), minute=int((hours % 1) * 60))
for _, hours in self.open_times.values()
]
# TODO: either unify naming OR add a field to model to indicate which image to use
s3_image_name = room["name"].replace(" ", "_") + (".png" if "2nd" in room["name"] else ".jpg") if "Pool" not in room["name"] else "Pool.jpeg"
room["image"] = f"https://s3.us-east-2.amazonaws.com/penn.mobile/pottruck/{s3_image_name}"
return response


Expand Down

0 comments on commit c0a6121

Please sign in to comment.