Skip to content

Instantly share code, notes, and snippets.

Avatar

Sandesh SandeshSarfare

  • Mumbai,India
View GitHub Profile
@SandeshSarfare
SandeshSarfare / gist:27cc755729c2ef0510d0
Created Jan 21, 2016
getCurrentContext() returns null randomly
View gist:27cc755729c2ef0510d0
//Members.js
----javascript
Members.getMember = function(Id, cb) {
var ctx = loopback.getCurrentContext();
var currentUser = ctx && ctx.get('currentUser');
var realms = [];
realms = currentUser.realm.split(",");
var fltr = {
You can’t perform that action at this time.