Skip to content

Commit

Permalink
switch to post call
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanHughes-dev committed Oct 19, 2024
1 parent c47f0f8 commit 6188cfe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion TelemetrySite/client/src/ServerCall.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
Expand Down
6 changes: 3 additions & 3 deletions TelemetrySite/server/Context/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -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):

Expand Down

0 comments on commit 6188cfe

Please sign in to comment.