Description
Hi,
The way that the date parameters are given to a Cloud Code function seems different on parse-server and Parse.com. This is how to reproduce it.
Create a Cloud Code function like this:
/**
* @description Just displays the given date parameter
*/
Parse.Cloud.define("myFunction", function(request, response) {
console.log(request.params.date);
response.success();
});
When I call this function through the REST API on Parse.com, the date parameter must have this format {__type: "Date", iso: "2016-02-25T00:00:00.000Z"}. Then, the console displays 2016-02-25T00:00:00.000Z probably because there is a mechanism to deserialize it before calling the function.
The same call with the same parameter on parse-server will make the console display {__type: "Date", iso: "2016-02-25T00:00:00.000Z"}.
So, to be able to continue to use my Cloud Code functions with parse-server, it seems now that I have to directly use 2016-02-25T00:00:00.000Z as a date parameter, instead of {__type: "Date", iso: "2016-02-25T00:00:00.000Z"}. Is this difference normal?
Thanks.