|
@@ -186,7 +186,7 @@ export class CloudQuery {
|
|
|
|
|
|
if (Object.keys(this.queryParams["where"]).length) {
|
|
|
const whereStr = JSON.stringify(this.queryParams["where"]);
|
|
|
- url += `where=${whereStr}`;
|
|
|
+ url += `where=${whereStr}&limit=1`;
|
|
|
}
|
|
|
|
|
|
const response = await fetch(url, {
|
|
@@ -211,6 +211,11 @@ export class CloudQuery {
|
|
|
|
|
|
dataToObj(exists:any):CloudObject{
|
|
|
let existsObject = new CloudObject(this.className);
|
|
|
+ Object.keys(exists).forEach(key=>{
|
|
|
+ if(exists[key]?.__type =="Object"){
|
|
|
+ exists[key] = this.dataToObj(exists[key])
|
|
|
+ }
|
|
|
+ })
|
|
|
existsObject.set(exists);
|
|
|
existsObject.id = exists.objectId;
|
|
|
existsObject.createdAt = exists.createdAt;
|