File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 11const _ = require ( 'underscore' ) ;
22const AVRequest = require ( './request' ) . request ;
33
4- const getUser = ( options = { } ) => AV . User . currentAsync ( )
5- . then ( currUser => currUser
6- ? currUser
7- : AV . User . _fetchUserBySessionToken ( options . sessionToken ) ) ;
8-
9- const getUserPointer = options => getUser ( options )
10- . then ( currUser => AV . Object . createWithoutData ( '_User' , currUser . id ) . _toPointer ( ) ) ;
4+ module . exports = function ( AV ) {
5+ const getUser = ( options = { } ) => AV . User . currentAsync ( )
6+ . then ( currUser => currUser || AV . User . _fetchUserBySessionToken ( options . sessionToken ) ) ;
117
8+ const getUserPointer = options => getUser ( options )
9+ . then ( currUser => AV . Object . createWithoutData ( '_User' , currUser . id ) . _toPointer ( ) ) ;
1210
13- module . exports = function ( AV ) {
1411 /**
1512 * Contains functions to deal with Status in LeanCloud.
1613 * @class
You can’t perform that action at this time.
0 commit comments