Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in cloud code not call Parse.Query #1523

Closed
davewang opened this issue Apr 17, 2016 · 2 comments
Closed

in cloud code not call Parse.Query #1523

davewang opened this issue Apr 17, 2016 · 2 comments

Comments

@davewang
Copy link

var _ = require('underscore');

var Post = Parse.Object.extend('Post');

// Display all posts.
exports.index = function(req, res) {
  console.log("index...applicationId............",Parse.applicationId);
  console.log("index...masterKey............",Parse.masterKey);
  console.log("index...serverURL............",Parse.serverURL);
  console.log("index...databaseURI............",Parse.databaseURI);
  var query = new Parse.Query(Post);
  query.descending('createdAt');
  query.find().then(function(results) {
    res.render('posts/index', { 
      posts: results
    });
    console.log("index find...............");
  },
  function() {
    res.send(500, 'Failed loading posts');
    console.log("index 500...............");
  });
  console.log("index end...............");
};

@drew-gross
Copy link
Contributor

Can you please post some code that demonstrates what you are doing, what you expected to happen, and what actually happened?

@flovilmart
Copy link
Contributor

Closing due to lack of activity, please reopen if the issue persist.

Don't forget to include your current:

  • node version
  • npm version
  • parse-server version
  • any relevant logs (VERBOSE=1 will enable verbose logging)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants