Skip to content

in cloud code not call Parse.Query #1523

Closed

Description

@davewang
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...............");
};

Activity

  1. drew-gross commented on Apr 18, 2016

    @drew-gross
    Contributor

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

  2. flovilmart commented on Jul 12, 2016

    @flovilmart
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions