work in new drawing and change api from old drawing
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user