mirror of
https://github.com/bspeice/UNCCGameDay-Server
synced 2024-12-04 13:58:14 -05:00
Add view to get the location of a parking lot
This commit is contained in:
parent
905787d0df
commit
8321385b8a
@ -57,6 +57,18 @@ class RateLot(APIView):
|
||||
'Get the rating choice options'
|
||||
return Response(ParkingRating.RATING_CHOICES)
|
||||
|
||||
class ParkingLotEntrance(APIView):
|
||||
"""
|
||||
Get the location of a parking lot
|
||||
**GET**: Get the latitude, longitude, and label of a parking lot
|
||||
"""
|
||||
|
||||
def get(self, request, lot):
|
||||
# The get_object_or_404 makes sure that it's a valid lot that will have
|
||||
# an entry in the LOT_ENTRANCES dictionary.
|
||||
parking_lot = get_object_or_404(ParkingLot, location=lot)
|
||||
return Response(ParkingLot.LOT_ENTRANCES[lot])
|
||||
|
||||
class RegisterUser(APIView):
|
||||
"""
|
||||
Handle Registration of users
|
||||
|
Loading…
Reference in New Issue
Block a user