Click here to Skip to main content
15,879,326 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i have built a cms page for Lahore Janitorial but my query code is not working properly. when i request to fetch the data the show fetal error

What I have tried:

lahorejanitor.connect({
    "lahorejanitor": "{clientKey}",
    "lahorejanitor": "{clientSecret}",
    "username": "{username}",
    "password": "{password}",
    "baseURL": "https://api.cloudcms.com"
}, function(err) {
 
    // here is some sample code of what we might then do
 
    // create a repository, get master branch
    this.createRepository().readBranch("master").then(function() {
 
        // create a few nodes
        this.createNode();
        this.createNode({ "title": "My second node" });
        this.createNode({ "title": "My third node", "name": "boo" });
 
        // query for nodes
        this.queryNodes({ "name": "boo" }).count(function(count) {
            console.log("count = " + count); // 1
        });
    });
 
    // create then delete a domain
    this.createDomain({
        "title": "Users and Groups"
    }).del();
 
});
Posted
Updated 9-Jan-19 5:48am
v2
Comments
Patrice T 9-Jan-19 0:06am    
And you plan to tell the error message and position ?

Try to choose, it is Java or JavaScript, not both.
ZurdoDev 9-Jan-19 8:13am    
0. I don't think the company would appreciate you posting their name and their code.
1. What is the error?
2. What line of code causes the error?

1 solution

Do you not find it confusing that in your lahorejanitor.connect() function your associative array begins with:
"lahorejanitor": "{clientKey}",
"lahorejanitor": "{clientSecret}", . . . 


And thus the first to members of the declaration have the same name?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900