backend-manager 2.5.90 → 2.5.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -21,19 +21,27 @@ Module.prototype.main = function () {
|
|
|
21
21
|
|
|
22
22
|
let count = 0;
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
try {
|
|
25
|
+
await self.signOutOfSession(uid, session)
|
|
26
|
+
.then(r => count += r)
|
|
27
|
+
|
|
28
|
+
// Legacy for somiibo and old electron-manager
|
|
29
|
+
await self.signOutOfSession(uid, 'gatherings/online')
|
|
30
|
+
.then(r => count += r)
|
|
31
|
+
|
|
32
|
+
await self.libraries.admin
|
|
33
|
+
.auth()
|
|
34
|
+
.revokeRefreshTokens(uid)
|
|
35
|
+
.then(() => {
|
|
36
|
+
return resolve({data: {sessions: count, message: `Successfully signed ${uid} out of all sessions`}});
|
|
37
|
+
})
|
|
38
|
+
.catch(e => {
|
|
39
|
+
return reject(assistant.errorManager(`Failed to sign out of all sessions: ${e}`, {code: 500, sentry: false, send: false, log: false}).error)
|
|
40
|
+
})
|
|
41
|
+
} catch (e) {
|
|
42
|
+
assistant.console.log(`@temp sign-out-all-sessions error: ${e}`);
|
|
43
|
+
return reject(assistant.errorManager(`Failed to sign out of all sessions: ${e}`, {code: 500, sentry: false, send: false, log: false}).error)
|
|
44
|
+
}
|
|
37
45
|
})
|
|
38
46
|
.catch(e => {
|
|
39
47
|
return reject(e);
|
|
@@ -94,11 +94,11 @@ Module.prototype.main = function() {
|
|
|
94
94
|
})
|
|
95
95
|
.catch(e => {
|
|
96
96
|
// console.log('---e', e);
|
|
97
|
-
self.payload.response.status = e.code
|
|
97
|
+
self.payload.response.status = e && e.code ? e.code : 500;
|
|
98
98
|
self.payload.response.error = e || new Error('Unknown error occured');
|
|
99
99
|
})
|
|
100
100
|
} catch (e) {
|
|
101
|
-
self.payload.response.status = 500;
|
|
101
|
+
self.payload.response.status = e && e.code ? e.code : 500;
|
|
102
102
|
self.payload.response.error = e || new Error('Unknown error occured');
|
|
103
103
|
}
|
|
104
104
|
})
|
|
@@ -123,7 +123,7 @@ Module.prototype.main = function() {
|
|
|
123
123
|
return resolve();
|
|
124
124
|
}
|
|
125
125
|
} else {
|
|
126
|
-
|
|
126
|
+
self.assistant.error(`Error executing ${resolved.command} @ ${resolved.path} (status=${self.payload.response.status}):`, self.payload.response.error)
|
|
127
127
|
// return res.send(self.payload.response.error.message);
|
|
128
128
|
res.send(`${self.payload.response.error}`)
|
|
129
129
|
return reject(self.payload.response.error);
|