File tree Expand file tree Collapse file tree 1 file changed +19
-18
lines changed
Expand file tree Collapse file tree 1 file changed +19
-18
lines changed Original file line number Diff line number Diff line change @@ -98,25 +98,26 @@ module.exports = AV => {
9898 throw new TypeError ( 'LiveQuery must be inited with a Query' ) ;
9999 const { where, keys, returnACL } = query . toJSON ( ) ;
100100 return Promise . resolve ( userDefinedSubscriptionId ) . then ( subscriptionId =>
101- request ( {
102- method : 'POST' ,
103- path : '/LiveQuery/subscribe' ,
104- data : {
105- query : {
106- where,
107- keys,
108- returnACL,
109- className : query . className ,
110- } ,
111- id : subscriptionId ,
112- } ,
113- } ) . then ( ( { query_id : queryId } ) =>
114- AV . _config . realtime
115- . createLiveQueryClient ( subscriptionId )
116- . then (
117- liveQueryClient => new AV . LiveQuery ( queryId , liveQueryClient )
101+ AV . _config . realtime
102+ . createLiveQueryClient ( subscriptionId )
103+ . then ( liveQueryClient =>
104+ request ( {
105+ method : 'POST' ,
106+ path : '/LiveQuery/subscribe' ,
107+ data : {
108+ query : {
109+ where,
110+ keys,
111+ returnACL,
112+ className : query . className ,
113+ } ,
114+ id : subscriptionId ,
115+ } ,
116+ } ) . then (
117+ ( { query_id : queryId } ) =>
118+ new AV . LiveQuery ( queryId , liveQueryClient )
118119 )
119- )
120+ )
120121 ) ;
121122 } ,
122123 }
You can’t perform that action at this time.
0 commit comments