master
parent
8d3840043f
commit
dfcd42a3c9
|
@ -216,7 +216,7 @@ function submitUserData(drawingZone) {
|
||||||
};
|
};
|
||||||
|
|
||||||
// First API call
|
// First API call
|
||||||
fetch(`https://api.teachertrainingkolkata.in/api/aiEvaluateImageToStar`, {
|
fetch(`https://ai-image-api.cs1.hz.siliconpin.com/bs_drawing`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
|
@ -230,9 +230,10 @@ function submitUserData(drawingZone) {
|
||||||
return response.json();
|
return response.json();
|
||||||
})
|
})
|
||||||
.then(data => {
|
.then(data => {
|
||||||
|
console.log('response from', data)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (data && data.message === "Game data saved successfully") {
|
if (data && data.message === "Game data saved successfully") {
|
||||||
let starValue = data.data.gameStar; // Ensure starValue is available
|
let starValue = data.gameStar; // Ensure starValue is available
|
||||||
|
|
||||||
let feedbackMessage = '';
|
let feedbackMessage = '';
|
||||||
if (starValue >= 1 && starValue <= 3) {
|
if (starValue >= 1 && starValue <= 3) {
|
||||||
|
|
Loading…
Reference in New Issue