cherri pick file

This commit is contained in:
Jan Prochazka
2024-06-24 14:51:23 +02:00
parent 9f9c4d82da
commit 8043869332

View File

@@ -201,9 +201,9 @@ module.exports = {
async list(_params, req) { async list(_params, req) {
const storage = require('./storage'); const storage = require('./storage');
const storageConnectionst = await storage.connections(); const storageConnections = await storage.connections();
if (storageConnectionst) { if (storageConnections) {
return storageConnectionst; return storageConnections;
} }
if (portalConnections) { if (portalConnections) {
if (platformInfo.allowShellConnection) return portalConnections; if (platformInfo.allowShellConnection) return portalConnections;
@@ -342,6 +342,14 @@ module.exports = {
if (volatile) { if (volatile) {
return volatile; return volatile;
} }
const storage = require('./storage');
const storageConnection = await storage.getConnection({conid});
if (storageConnection) {
return storageConnection;
}
if (portalConnections) { if (portalConnections) {
const res = portalConnections.find(x => x._id == conid) || null; const res = portalConnections.find(x => x._id == conid) || null;
return mask && !platformInfo.allowShellConnection ? maskConnection(res) : res; return mask && !platformInfo.allowShellConnection ? maskConnection(res) : res;