1
0
forked from noxious/client

Forgot to push

This commit is contained in:
2024-09-16 20:51:48 +02:00
parent a8184449c5
commit 6bc0c7ab3f
2 changed files with 24 additions and 6 deletions

View File

@ -21,6 +21,18 @@ export const useAssetStore = defineStore('assets', {
console.error('Error fetching assets:', error)
return false
})
},
fetchAssetsByZoneId(zoneId: number) {
return fetch(config.server_endpoint + '/assets/' + zoneId)
.then((response) => response.json())
.then((assets) => {
this.setAssets(assets)
return true
})
.catch((error) => {
console.error('Error fetching assets:', error)
return false
})
}
}
})