forked from noxious/client
Forgot to push
This commit is contained in:
@ -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
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user