Hello.
I need to save numeric data into the database using cloud functions.
My problem is that if the column in the database is of type number I get the 400 response and data is not saved,
but if the column is of type string the operation is successful.
Yet I can’t keep it a string because I need to sort it. I tried converting the number to a string inside the cloud function, but it didn’t work.
const Game = Moralis.Object.extend("Game");
const game = new Game();
const aiLevel = Number(request.params.aiLevel);
game.set("aiLevel", aiLevel);
I’m using the REST GET requests to transfer the data to the cloud function and then save it to the DB from the cloud. My version of the react SDK is 1.3.5 and 1.5.9 of the moralis. I downgraded because of the strange errors in the new versions.
As a workaround, I will probably download all the data and then convert it to a number on the front end and sort it there instead of in the cloud. But this shouldn’t be so hard, what do you think?