51
51
< div class ="text-center ml-20 lg:text-left ">
52
52
< div class ="avatar " onclick ="my_modal_1.showModal() ">
53
53
< div id = "pic " class ="w-24 rounded-full shadow-2xl " >
54
- <!-- <img id="profilePic" src="http://csa-ai.stu.nighthawkcodingsociety.com /api/person/image/${userEmail}" onerror="handleImageError()"/> -->
54
+ <!-- <img id="profilePic" src="http://localhost:8017 /api/person/image/${userEmail}" onerror="handleImageError()"/> -->
55
55
</ div >
56
56
</ div >
57
57
< dialog id ="my_modal_1 " class ="modal ">
@@ -120,14 +120,14 @@ <h2 class="text-2xl mb-4">Stock Predictions</h2>
120
120
const token1 = getCookie ( "token" ) ;
121
121
const decodedToken = parseJwt ( token1 ) ;
122
122
const userEmail = decodedToken . sub ;
123
- document . getElementById ( 'pic' ) . innerHTML = `<img id="profilePic" src="http://csa-ai.stu.nighthawkcodingsociety.com /api/person/image/${ userEmail } " onerror="handleImageError()"/>` ;
123
+ document . getElementById ( 'pic' ) . innerHTML = `<img id="profilePic" src="http://localhost:8017 /api/person/image/${ userEmail } " onerror="handleImageError()"/>` ;
124
124
function handleImageError ( ) {
125
125
imgElement = document . getElementById ( 'profilePic' ) ;
126
126
127
127
imgElement . style . display = 'none' ;
128
128
document . getElementById ( 'pic' ) . innerHTML = `<img id="profilePic" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTPjKATmnhrK5tAwwubWT4StUWrCzms3kOx0eYfXtHqLg&s">` ; // Display an error message
129
129
}
130
- var setURL = "http://csa-ai.stu.nighthawkcodingsociety.com /api/person/updateStocks"
130
+ var setURL = "http://localhost:8017 /api/person/updateStocks"
131
131
132
132
const fileInput = document . getElementById ( 'file-input' ) ;
133
133
const errorMessage = document . getElementById ( 'errorMessage' ) ;
@@ -235,7 +235,7 @@ <h2 class="text-2xl mb-4">Stock Predictions</h2>
235
235
const userId = decodedToken . id ;
236
236
const profileEmailSpan = document . getElementById ( "profileEmail" ) ;
237
237
238
- fetch ( "http://csa-ai.stu.nighthawkcodingsociety.com /api/person/" + userId , {
238
+ fetch ( "http://localhost:8017 /api/person/" + userId , {
239
239
method : 'GET' ,
240
240
headers : {
241
241
'Content-Type' : 'application/json' ,
@@ -337,7 +337,7 @@ <h2 class="text-2xl mb-4">Stock Predictions</h2>
337
337
redirect : "follow"
338
338
} ;
339
339
340
- fetch ( "http://csa-ai.stu.nighthawkcodingsociety.com /api/person/stats/" + userId , requestOptions )
340
+ fetch ( "http://localhost:8017 /api/person/stats/" + userId , requestOptions )
341
341
. then ( response => {
342
342
if ( ! response . ok ) {
343
343
throw new Error ( 'Network response was not ok' ) ;
@@ -390,11 +390,11 @@ <h2 class="text-2xl mb-4">Stock Predictions</h2>
390
390
redirect : "follow"
391
391
} ;
392
392
393
- fetch ( "http://csa-ai.stu.nighthawkcodingsociety.com /api/person/image/post" , requestOptions )
393
+ fetch ( "http://localhost:8017 /api/person/image/post" , requestOptions )
394
394
. then ( ( response ) => response . text ( ) )
395
395
. then ( ( result ) => console . log ( result ) )
396
396
. then ( ( blob ) => {
397
- document . getElementById ( 'pic' ) . innerHTML = `<img id="profilePic" src="http://csa-ai.stu.nighthawkcodingsociety.com /api/person/image/${ userEmail } " onerror="handleImageError()"/>` ;
397
+ document . getElementById ( 'pic' ) . innerHTML = `<img id="profilePic" src="http://localhost:8017 /api/person/image/${ userEmail } " onerror="handleImageError()"/>` ;
398
398
}
399
399
400
400
)
@@ -413,7 +413,7 @@ <h2 class="text-2xl mb-4">Stock Predictions</h2>
413
413
// redirect: "follow"
414
414
// };
415
415
416
- // fetch("http://csa-ai.stu.nighthawkcodingsociety.com /api/person/image/" + userEmail, requestOptions)
416
+ // fetch("http://localhost:8017 /api/person/image/" + userEmail, requestOptions)
417
417
// .then((response) => response.blob()) // Fetch image as Blob
418
418
// .then((blob) => {
419
419
// const url = URL.createObjectURL(blob); // Create URL for Blob
0 commit comments