This commit is contained in:
Baobhan Sith
2025-05-10 11:10:34 +08:00
parent 3605ce0aee
commit 43aec26632
3 changed files with 1 additions and 4 deletions
@@ -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);