fix: remove unused logging

This commit is contained in:
wancat committed 2024-06-28 16:05:45 +08:00
1 parent 48835f8830
commit 218d433c14
4 files changed
+2 -6

No files matched your search

-1
View File
@@ -6,7 +6,6 @@ import MarkdownText from '../MarkdownText.vue'
const sessionStore = useSession()
const current = ref(-1)
const length = computed(() => {
console.log(sessionStore.session?.responses)
return sessionStore.session?.responses.length ?? 0
})
@@ -35,7 +35,6 @@ export const getSessionList = asyncHandler(
const { questId, status } = matchedData(req)
const query = { user: user.id, quest: questId, status }
const sessions = await Session.find(query)
console.log(query, sessions)
res.json(sessions.map(sessionSummary))
}
)
+1 -3
View File
@@ -8,7 +8,6 @@ import SessionMiddleware from '../middleware/session.js'
import { genJWT } from '../utils/auth.js'
import logger from '../utils/logger.js'
// eslint-disable-next-line no-unused-vars
type SocketCallback = (event: string, ...args: any[]) => void
const sessions = new Map<string, SocketCallback[]>()
@@ -44,7 +43,6 @@ async function connectContainer(socket: Socket, next: (err?: Error) => void) {
next(new Error('User not found.'))
return
}
// console.log(socket.handshake)
const { sessionId } = socket.handshake.query
if (
!sessionId ||
@@ -79,7 +77,7 @@ async function connectContainer(socket: Socket, next: (err?: Error) => void) {
stream,
}
next()
} catch (err) {
} catch {
next(new Error('Failed to start container.'))
}
}
+1 -1
View File
@@ -82,7 +82,7 @@ export async function deleteContainer(id: string) {
}
try {
await container.stop()
} catch (error) {
} catch {
logger.warn('Failed to stop container', id)
}
await container.remove()