File tree 1 file changed +7
-4
lines changed 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -167,14 +167,17 @@ function handleDelete(req) {
167
167
function handleLogOut ( req ) {
168
168
var success = { response : { } } ;
169
169
if ( req . info && req . info . sessionToken ) {
170
- rest . find ( req . config , Auth . master ( req . config ) , '_Session' ,
170
+ return rest . find ( req . config , Auth . master ( req . config ) , '_Session' ,
171
171
{ _session_token : req . info . sessionToken }
172
172
) . then ( ( records ) => {
173
173
if ( records . results && records . results . length ) {
174
- rest . del ( req . config , Auth . master ( req . config ) , '_Session' ,
175
- records . results [ 0 ] . id
176
- ) ;
174
+ return rest . del ( req . config , Auth . master ( req . config ) , '_Session' ,
175
+ records . results [ 0 ] . objectId
176
+ ) . then ( ( ) => {
177
+ return Promise . resolve ( success ) ;
178
+ } ) ;
177
179
}
180
+ return Promise . resolve ( success ) ;
178
181
} ) ;
179
182
}
180
183
return Promise . resolve ( success ) ;
You can’t perform that action at this time.
0 commit comments