Lerning points where not fetched with correct params

This commit is contained in:
2026-01-12 16:36:35 +01:00
parent 0b57fbc618
commit 6cd9681fc3
2 changed files with 21 additions and 2 deletions
@@ -134,7 +134,7 @@ export default {
await this.loadSkillCategories()
},
methods: {
async loadSession() {
async loadSession(preserveCurrentStep = false) {
try {
const token = localStorage.getItem('token')
const response = await API.get(`/api/characters/create-session/${this.sessionId}`, {
@@ -142,7 +142,10 @@ export default {
})
this.sessionData = response.data
this.currentStep = response.data.current_step || 1
// Only update currentStep if not preserving it
if (!preserveCurrentStep) {
this.currentStep = response.data.current_step || 1
}
} catch (error) {
console.error('Error loading session:', error)
this.$router.push('/dashboard')
@@ -179,6 +182,10 @@ export default {
// Save progress for current step before moving to next
await this.saveProgressForStep(this.currentStep, data)
// Reload session data from backend to ensure consistent state
// Preserve currentStep as we'll increment it after
await this.loadSession(true)
// Move to next step
this.currentStep++
} catch (error) {