fix(openapi-ts): first pass for replacing with openapi-ts

This commit is contained in:
2026-05-23 18:53:33 +02:00
parent 62a81e57ad
commit f1afb2096f
6 changed files with 40 additions and 37 deletions
+7 -7
View File
@@ -1,11 +1,11 @@
import { defineStore } from 'pinia'
import { ref, computed } from 'vue'
import type { SteamCollectionItem } from '@/types'
import { apiService } from '@/services/apiService'
import { submissionsApiListPuzzles } from '@/api'
export const usePuzzlesStore = defineStore('puzzles', () => {
// State
const puzzles = ref<SteamCollectionItem[]>([])
const puzzles = ref<any[]>([])
const isLoading = ref(false)
const error = ref<string>('')
@@ -33,18 +33,18 @@ export const usePuzzlesStore = defineStore('puzzles', () => {
// Actions
const loadPuzzles = async () => {
if (puzzles.value.length > 0) return // Already loaded
try {
isLoading.value = true
error.value = ''
const response = await apiService.getPuzzles()
const response = await submissionsApiListPuzzles()
if (response.error) {
error.value = response.error
error.value = String(response.error)
console.error('Failed to load puzzles:', response.error)
return
}
if (response.data) {
puzzles.value = response.data
}