Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
bugfix token
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterofSoftware committed Oct 29, 2023
1 parent 0130cba commit 79c0f58
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions backend/getRoutes.py
@@ -1,6 +1,7 @@
import requests
import json
import time
import os
from dotenv import load_dotenv
import xml.etree.ElementTree as ET# Constructing the XML elements and attributes
from coop_locations import getCoopLocations
Expand All @@ -12,6 +13,7 @@ def getRoute(coopLocations, routingProfile, originCoordinates):
body = {"coordinates": [[originCoordinates.get("Longitude"),originCoordinates.get("Latitude")], [longitude, latitude]]}

load_dotenv()
authorization = os.getenv("authorization")

headers = {
'Accept': 'application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8',
Expand Down Expand Up @@ -66,6 +68,9 @@ def getAllRoutes(routingProfile, coopLocations,originCoordinates):

else:
print("Wrong Routing Profile", routingProfile)

def getBestRoute(routingProfile, coopLocations,originCoordinates):
getAllRoutes(routingProfile, coopLocations, originCoordinates)

if __name__ == '__main__':
originCoordinates, coopLocations = getCoopLocations("Basel", time_filter=False)
Expand Down

0 comments on commit 79c0f58

Please sign in to comment.