This commit is contained in:
Suvodip
2024-11-22 17:14:50 +05:30
parent e4dc874374
commit 12aeec0947
7 changed files with 10201 additions and 3490 deletions

View File

@@ -5,7 +5,7 @@
const urlParams = new URLSearchParams(queryString);
const userId = urlParams.get('userId');
const gameVersion = urlParams.get('gameName');
let gameId;
const gameId = urlParams.get('id');
let submitNotic;
console.log(userId);
@@ -118,7 +118,7 @@ function submitUserData(drawingZone) {
};
console.log(userData);
fetch(`https://api.teachertrainingkolkata.in/api/saveGameScore`, {
fetch(`https://api.teachertrainingkolkata.in/api/saveGameScore2`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'

View File

@@ -194,7 +194,7 @@ function submitUserData(drawingZone) {
'gameStar' : starValue
};
console.log(userData);
fetch(`https://api.teachertrainingkolkata.in/api/saveGameScore`, {
fetch(`https://api.teachertrainingkolkata.in/api/saveGameScore2`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'

View File

@@ -6,7 +6,7 @@ const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const userId = urlParams.get('userId');
const gameVersion = urlParams.get('gameName');
let gameId;
const gameId = urlParams.get('id');
let submitNotic;
console.log(userId);
@@ -16,13 +16,7 @@ let startTime = Date.now();
const url = window.location.href;
const gameName = url.split('/');
const gameType = gameName[3].split('?id=');
// let gameVersion;
// console.log("Here is game name ", gameType[0])
// if(gameType[0] == "guided-tracing"){
// gameVersion = gameType[0].split('?')[0];
// gameId = gameName[4];
// let gameVersion;iVBORw0KGgoAAAANSUhEUgAAB4A
// console.log('Type - 1');
// } else if(gameName.length == 4){
@@ -105,8 +99,8 @@ function submitUserData(drawingZone) {
'score' : scoreTotal,
'gameStar' : starValue
};
// console.log(userData);
fetch(`https://api.teachertrainingkolkata.in/api/saveGameScore`, {
console.log(userData);
fetch(`https://api.teachertrainingkolkata.in/api/saveGameScore2`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'