Skip to content

Commit

Permalink
Bug fix with map
Browse files Browse the repository at this point in the history
  • Loading branch information
codergautam committed Oct 16, 2024
1 parent 854758f commit 5a67191
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions components/maps/mapView.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default function MapView({ inLegacy, gameOptions, setGameOptions, singlep
}
useEffect(() => {
refreshHome();
}, [session?.token?.secret, text]);
}, [session?.token?.secret]);

const debounce = (func, delay) => {
let timer;
Expand Down Expand Up @@ -106,7 +106,7 @@ export default function MapView({ inLegacy, gameOptions, setGameOptions, singlep
return;
}

fetch("/api/map/action", {
fetch(window.cConfig?.apiUrl+"/api/map/action", {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down Expand Up @@ -153,7 +153,7 @@ export default function MapView({ inLegacy, gameOptions, setGameOptions, singlep

setHeartingMap(map.id);

fetch("/api/map/heartMap", {
fetch(window.cConfig?.apiUrl+"/api/map/heartMap", {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down
5 changes: 2 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ var app = express();
// disable cors
import cors from 'cors';
app.use(cors());
app.use(bodyParser.json());

app.use(express.json());
app.use(bodyParser.json({limit: '5mb'}));
app.use(bodyParser.urlencoded({limit: '5mb', extended: true, parameterLimit:50000}));

// Setup your /api routes
const apiFolder = path.join(__dirname, 'api');
Expand Down

0 comments on commit 5a67191

Please sign in to comment.