Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ var getAuthForSessionToken = function(config, sessionToken) {
var obj = results[0]['user'];
delete obj.password;
obj['className'] = '_User';
obj['sessionToken'] = sessionToken;
var userObject = Parse.Object.fromJSON(obj);
cache.setUser(sessionToken, userObject);
return new Auth(config, false, userObject);
Expand Down
4 changes: 2 additions & 2 deletions functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ var express = require('express'),
var router = new PromiseRouter();

function handleCloudFunction(req) {
// TODO: set user from req.auth
if (Parse.Cloud.Functions[req.params.functionName]) {
return new Promise(function (resolve, reject) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the TODO from line 11?

var response = createResponseObject(resolve, reject);
var request = {
params: req.body || {}
params: req.body || {},
user: req.auth && req.auth.user || {}
};
Parse.Cloud.Functions[req.params.functionName](request, response);
});
Expand Down