work in new drawing and change api from old drawing

This commit is contained in:
dev sp
2023-12-28 15:30:53 +00:00
parent d40c6a1121
commit 1992331b96
4 changed files with 46 additions and 24 deletions

View File

@@ -61,12 +61,15 @@ import Layout from '../../layouts/Layout.astro';
const params = new URLSearchParams(window.location.search);
const paramsID = params.get('id');
const data = fetch(`https://management.beanstalkedu.com/items/game_drawing/${encodeURIComponent(paramsID)}`)
const data = fetch(`https://game-du.teachertrainingkolkata.in/items/game_drawing/${encodeURIComponent(paramsID)}`)
.then(response => response.json())
.then(({data}) => {
console.log(data)
// colorList = data.colors;
const {image} = data;
assetsList.image = "https://management.beanstalkedu.com/assets/" + image; // + "?width=450";
assetsList.image = "https://game-du.teachertrainingkolkata.in/assets/" + image; // + "?width=450";
console.log(assetsList)
const config = {
type: Phaser.AUTO,
width: window.innerWidth,
@@ -109,7 +112,7 @@ import Layout from '../../layouts/Layout.astro';
function create() {
const params = new URLSearchParams(window.location.search);
const paramsID = params.get('id');
fetch(`https://management.beanstalkedu.com/items/game_drawing/${encodeURIComponent(paramsID)}`)
fetch(`https://game-du.teachertrainingkolkata.in/items/game_drawing/${encodeURIComponent(paramsID)}`)
.then(response => response.json())
.then(({ data }) => {
// console.log(data.colors)