Skip to content

Commit

Permalink
updated directus url
Browse files Browse the repository at this point in the history
  • Loading branch information
edouardbruelhart committed Aug 20, 2024
1 parent 51d4faf commit ef8ffd1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ms_sample_list_creator/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def testConnection(self) -> None:
and output_folder
):
# Define the Directus base URL
base_url = "http://directus.dbgi.org"
base_url = "https://emi-collection.unifr.ch/directus"

# Define the login endpoint URL
login_url = base_url + "/auth/login"
Expand All @@ -353,7 +353,7 @@ def testConnection(self) -> None:

# Test if the method is already present in directus
access_token = os.environ.get("ACCESS_TOKEN")
base_url = "http://directus.dbgi.org"
base_url = "https://emi-collection.unifr.ch/directus"
collection_url = base_url + f"/items/Injection_Methods/{self.file}"
session = requests.Session()
session.headers.update({"Authorization": f"Bearer {access_token}"})
Expand All @@ -367,7 +367,7 @@ def testConnection(self) -> None:
# else adds the new method to directus
else:
# Send data to directus
base_url = "http://directus.dbgi.org"
base_url = "https://emi-collection.unifr.ch/directus"
collection_url = base_url + "/items/Injection_Methods"
session = requests.Session()
session.headers.update({"Authorization": f"Bearer {access_token}"})
Expand Down Expand Up @@ -561,7 +561,7 @@ def add_row(self, event: Optional[tk.Event] = None) -> None:
inj_volume = self.inj_volume

# Send data to directus
base_url = "http://directus.dbgi.org"
base_url = "https://emi-collection.unifr.ch/directus"
collection_url = base_url + "/items/Mass_Spectrometry_Analysis"
session = requests.Session()
session.headers.update({"Authorization": f"Bearer {self.access_token}"})
Expand Down Expand Up @@ -723,7 +723,7 @@ def directus_reconnect(self) -> None:
password = os.environ.get("PASSWORD")

# Define the Directus base URL
base_url = "http://directus.dbgi.org"
base_url = "https://emi-collection.unifr.ch/directus"

# Define the login endpoint URL
login_url = base_url + "/auth/login"
Expand Down Expand Up @@ -960,7 +960,7 @@ def submit_result(self) -> None:

# Send data to directus
records = directus_df.to_json(orient="records")
base_url = "http://directus.dbgi.org"
base_url = "https://emi-collection.unifr.ch/directus"
collection_url = base_url + "/items/Mass_Spectrometry_Analysis"
session = requests.Session()
headers = {"Content-Type": "application/json"}
Expand Down

0 comments on commit ef8ffd1

Please sign in to comment.