From 8cec51cadc317cfa56634bcdb7388f42386acf80 Mon Sep 17 00:00:00 2001 From: AmorimDSJM Date: Fri, 24 Nov 2023 14:16:22 +0100 Subject: [PATCH] Problems in Create Agent Fixed git add .! --- js/main.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/js/main.js b/js/main.js index 6c4e2f1..81f5993 100644 --- a/js/main.js +++ b/js/main.js @@ -1,4 +1,7 @@ 'use strict' + +// ------------------- Create Agent ------------------- + function createAgent(faction, symbol){ const data = {faction: faction, symbol: symbol} const settings = { @@ -11,20 +14,21 @@ function createAgent(faction, symbol){ 'Accept': 'application/json' }, processData: false, - data: data + data: JSON.stringify(data) }; $.ajax(settings).done(function (response) { console.log(response.data); return response.data; }); - } + $(document).ready(function() { - let agent = createAgent("COSMIC","Fewsgereb5"); - +let agent = createAgent("COSMIC","Fewsgereb55"); }) + +// ------------------- Get Agent -------------------