1313 * See the License for the specific language governing permissions and
1414 * limitations under the License.
1515 */
16- import apprt_request from "apprt-request " ;
16+ import { apprtFetch } from "apprt-fetch " ;
1717
1818export default class QueryController {
1919
2020 findRelatedRecords ( objectId , url , metadata ) {
2121 const relationships = this . relationships = metadata . relationships ;
2222 const requests = relationships . map ( ( relationship ) => {
2323 const relationshipId = relationship && relationship . id ;
24- return apprt_request ( url + "/queryRelatedRecords" , {
24+ return apprtFetch ( url + "/queryRelatedRecords" , {
2525 query : {
2626 objectIds : [ objectId ] ,
2727 relationshipId : relationshipId ,
@@ -45,7 +45,7 @@ export default class QueryController {
4545 if ( ! relationship || ! results . length ) {
4646 resolve ( results ) ;
4747 } else {
48- const requests = results . map ( ( result ) => apprt_request ( relationship . tableUrl + "/query" , {
48+ const requests = results . map ( ( result ) => apprtFetch ( relationship . tableUrl + "/query" , {
4949 query : {
5050 where : relationship . foreignKey + " LIKE " + result [ relationship . primaryKey ] ,
5151 outFields : "*" ,
@@ -76,7 +76,7 @@ export default class QueryController {
7676 const relationships = this . relationships = metadata . relationships ;
7777 const requests = relationships . map ( ( relationship ) => {
7878 const relatedTableId = relationship && relationship . relatedTableId ;
79- return apprt_request ( url + "/" + relatedTableId , {
79+ return apprtFetch ( url + "/" + relatedTableId , {
8080 query : {
8181 f : 'json'
8282 } ,
@@ -87,7 +87,7 @@ export default class QueryController {
8787 }
8888
8989 getMetadata ( url ) {
90- return apprt_request ( url , {
90+ return apprtFetch ( url , {
9191 query : {
9292 f : 'json'
9393 } ,
0 commit comments