update
This commit is contained in:
@@ -192,12 +192,10 @@ export class SshSuspendService extends EventEmitter {
|
||||
* @returns Promise<SuspendedSessionInfo[]> 挂起会话信息的数组。
|
||||
*/
|
||||
async listSuspendedSessions(userId: number): Promise<SuspendedSessionInfo[]> {
|
||||
console.log(`[SshSuspendService DEBUG] listSuspendedSessions: Called for userId=${userId}`);
|
||||
const userSessions = this.getUserSessions(userId);
|
||||
const sessionsInfo: SuspendedSessionInfo[] = [];
|
||||
|
||||
for (const [suspendSessionId, details] of userSessions.entries()) {
|
||||
console.log(`[SshSuspendService DEBUG] listSuspendedSessions: Processing suspendSessionId=${suspendSessionId}, status=${details.backendSshStatus}`);
|
||||
sessionsInfo.push({
|
||||
suspendSessionId,
|
||||
connectionName: details.connectionName,
|
||||
|
||||
@@ -23,7 +23,6 @@ export class SshSuspendController {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`[SshSuspendController] getSuspendedSshSessions called for user ID: ${userId}`);
|
||||
|
||||
const sessions: SuspendedSessionInfo[] = await sshSuspendService.listSuspendedSessions(userId);
|
||||
res.status(200).json(sessions);
|
||||
|
||||
Reference in New Issue
Block a user