diff --git a/.DS_Store b/.DS_Store index 6864297..1c5a731 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/back-end/.DS_Store b/back-end/.DS_Store index 1144c75..871fb31 100644 Binary files a/back-end/.DS_Store and b/back-end/.DS_Store differ diff --git a/back-end/services/home.service.js b/back-end/services/home.service.js index 85dbd42..9c2cecc 100644 --- a/back-end/services/home.service.js +++ b/back-end/services/home.service.js @@ -17,7 +17,7 @@ async function generateText(transcript, nameCookie, req) { const response = await axios.post( "https://api.openai.com/v1/completions", { - model: "text-davinci-003", + model: "gpt-3.5-turbo-instruct", prompt: `From most preferred to least preferred, my partner's love languages are: ${first}, ${second}, ${third}, ${fourth}, and ${fifth}. ${transcript}. Answer based on the given information, and be creative, but don't give me a list of their love languages or step by step instructions.`, temperature: 0.7, max_tokens: 256, diff --git a/front-end/src/pages/home.jsx b/front-end/src/pages/home.jsx index 9aab279..f87127e 100644 --- a/front-end/src/pages/home.jsx +++ b/front-end/src/pages/home.jsx @@ -20,7 +20,7 @@ function Home() { useEffect(() => { // send the request to the server api, including the Authorization header with our JWT token in it axios - .get("https://8heart.zzzzion.com/back-end/protected/home/", { + .get("http://localhost:8000/protected/home/", { headers: { Authorization: `JWT ${jwtToken}` }, // pass the token, if any, to the server }) .then((res) => { @@ -46,7 +46,7 @@ function Home() { const fetchData = async () => { try { const response = await axios.post( - "https://8heart.zzzzion.com/back-end/home/", + "http://localhost:8000/home/", { transcript: transcript, nameCookie: myName }, { headers: { diff --git a/front-end/src/pages/login.jsx b/front-end/src/pages/login.jsx index 7a69123..0e5327d 100644 --- a/front-end/src/pages/login.jsx +++ b/front-end/src/pages/login.jsx @@ -60,6 +60,8 @@ const Login = (props) => { const handleSubmit = async (e) => { e.preventDefault(); + console.log("given username: " + e.target.username.value);; + console.log("given password: " + e.target.password.value);; try { const requestData = { username: e.target.username.value, @@ -67,7 +69,7 @@ const Login = (props) => { }; const response = await axios.post( - `https://8heart.zzzzion.com/back-end/auth/login`, + `http://localhost:8000/auth/login`, requestData ); diff --git a/front-end/src/pages/signup.jsx b/front-end/src/pages/signup.jsx index 813d557..8a947a1 100644 --- a/front-end/src/pages/signup.jsx +++ b/front-end/src/pages/signup.jsx @@ -50,7 +50,7 @@ const Signup = (props) => { }; // send a POST request with the data to the server api to authenticate const response = await axios.post( - `https://8heart.zzzzion.com/back-end/auth/register`, + `http://localhost:8000/auth/register`, requestData ); // store the response data into s the data state variable diff --git a/front-end/src/pages/signupmessage.jsx b/front-end/src/pages/signupmessage.jsx index 0385889..ed665a0 100644 --- a/front-end/src/pages/signupmessage.jsx +++ b/front-end/src/pages/signupmessage.jsx @@ -15,7 +15,7 @@ function SignupMessage() { async function generateLink() { try { console.log('myName: ', myName); - const response = await axios.post("https://8heart.zzzzion.com/back-end/linkinfo", { + const response = await axios.post("http://localhost:8000/linkinfo", { nameCookie: myName, }); setLink(response.data); diff --git a/front-end/src/pages/survey.jsx b/front-end/src/pages/survey.jsx index d6539d6..430ab1d 100644 --- a/front-end/src/pages/survey.jsx +++ b/front-end/src/pages/survey.jsx @@ -29,7 +29,7 @@ function SurveyComponent() { survey.onComplete.add((sender, options) => { const values = sender.data; console.log(values); - axios.post('https://8heart.zzzzion.com/back-end/ranking/update', { uniqueLink, loveLanguages: values["love-languages"] }, { withCredentials: true }) + axios.post('http://localhost:8000/ranking/update', { uniqueLink, loveLanguages: values["love-languages"] }, { withCredentials: true }) .then(response => { console.log(response.data); }) diff --git a/front-end/vercel.json b/front-end/vercel.json new file mode 100644 index 0000000..515253d --- /dev/null +++ b/front-end/vercel.json @@ -0,0 +1 @@ +{ "version": 2, "rewrites": [{ "source": "/(.*)", "destination": "/api" }] } \ No newline at end of file