From 6188cfe4aff09ea0a9b19d72a56c80ed4d637f99 Mon Sep 17 00:00:00 2001 From: Evan H Date: Sat, 19 Oct 2024 10:29:44 -0400 Subject: [PATCH] switch to post call --- TelemetrySite/client/src/ServerCall.jsx | 2 +- TelemetrySite/server/Context/context.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/TelemetrySite/client/src/ServerCall.jsx b/TelemetrySite/client/src/ServerCall.jsx index 18ed508..22f63d7 100644 --- a/TelemetrySite/client/src/ServerCall.jsx +++ b/TelemetrySite/client/src/ServerCall.jsx @@ -45,7 +45,7 @@ const PostContextData = async (postData) => { try { const response = await fetch(BASE_URL + ServerCalls["context"], { //post data to the server - method: "PUT", + method: "POST", headers: { "Content-Type": "application/json", }, diff --git a/TelemetrySite/server/Context/context.py b/TelemetrySite/server/Context/context.py index 9b40e13..592a08a 100644 --- a/TelemetrySite/server/Context/context.py +++ b/TelemetrySite/server/Context/context.py @@ -26,7 +26,7 @@ def get(self): return jsonify(configData).get_data(as_text=True), 200 - def put(self): + def post(self): # Get JSON data from the request data = request.get_json() sqlCommands = [ @@ -113,10 +113,10 @@ def put(self): return jsonify({"message": "Data received successfully", "received": data}), 201 - def post(self): + def put(self): #setup later to adjust data - return jsonify(["Post Called"]) + return jsonify(["Put Called"]) def delete(self):