mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
refactor: Remove commented out code and unused imports
This commit is contained in:
1 parent
218d433c14
commit
d795dbd788
6 files changed
+3
-25
No files matched your search
@@ -93,21 +93,4 @@ export function useTerminal() {
|
||||
return term
|
||||
}
|
||||
|
||||
// export async function init(questId: string) {
|
||||
// if (!questId) throw new Error('No quest ID provided')
|
||||
// reset()
|
||||
// try {
|
||||
// await setQuest(questId)
|
||||
// } catch (err) {
|
||||
// console.error(err)
|
||||
// throw new LoadQuestError('Failed to load quest', questId)
|
||||
// }
|
||||
// try {
|
||||
// await getActiveSession(questId)
|
||||
// } catch (err) {
|
||||
// console.error(err)
|
||||
// throw new LoadSessionError('Failed to load session', questId)
|
||||
// }
|
||||
// }
|
||||
|
||||
export default useSession
|
||||
@@ -46,7 +46,6 @@ class SocketTerminal {
|
||||
|
||||
mount(reference: HTMLElement): void {
|
||||
this.term.open(reference)
|
||||
// this.term.focus()
|
||||
this.resizeScreen()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, onMounted } from 'vue'
|
||||
// import { onMounted } from 'vue'
|
||||
// import { useToast } from 'vue-toastification'
|
||||
import useSession from '../store/session'
|
||||
// import { init } from '../store/session'
|
||||
import HeaderPart from '../components/header/HeaderPart.vue'
|
||||
import GameHeaderComponents from '../components/header/GameHeaderComponents.vue'
|
||||
// import CommandlistPart from '../components/CommandlistPart.vue'
|
||||
import HintPart from '../components/game/HintPart.vue'
|
||||
import QuestPart from '../components/game/QuestPart.vue'
|
||||
import TerminalPart from '../components/game/TerminalPart.vue'
|
||||
|
||||
@@ -69,7 +69,7 @@ export const getSessionById = asyncHandler(
|
||||
}
|
||||
)
|
||||
|
||||
export const getActiveSessionControler = asyncHandler(
|
||||
export const getActiveSessionHandler = asyncHandler(
|
||||
async (req: Request, res: Response) => {
|
||||
const { questId } = matchedData(req)
|
||||
const user = await User.findById((req.user as Express.ExistingUser).id)
|
||||
|
||||
@@ -20,7 +20,7 @@ router.post(
|
||||
router.get(
|
||||
'/active',
|
||||
activeSessionValidator,
|
||||
sessionController.getActiveSessionControler
|
||||
sessionController.getActiveSessionHandler
|
||||
)
|
||||
router.get(
|
||||
'/:sessionId',
|
||||
|
||||
@@ -112,7 +112,7 @@ export default class CommandHandler extends SessionHandler {
|
||||
)
|
||||
)
|
||||
return checks.every((c) => c === true)
|
||||
} catch (e) {
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user