blob
This commit is contained in:
parent
18ecaea6af
commit
666b38f2f9
|
@ -25,14 +25,16 @@ export const useImagesStore = defineStore('images', {
|
|||
|
||||
if (this.list[name].type == 'tg') {
|
||||
file_url_data = await apiCall<string[]>(`tgbot/items/get_image/${name}/`)
|
||||
if (file_url_data.length > 0 && file_url_data[0] !== null) {
|
||||
this.list[name].status = 'success'
|
||||
this.list[name].result = file_url_data[0]
|
||||
} else {
|
||||
this.list[name].status = 'error'
|
||||
}
|
||||
} else if (this.list[name].type == 'aws') {
|
||||
file_url_data = await apiCall<string[]>(`tgbot/items/get_image_s3/${name}/`)
|
||||
}
|
||||
if (file_url_data.length > 0 && file_url_data[0] !== null) {
|
||||
this.list[name].result = URL.createObjectURL(file_url_data);
|
||||
this.list[name].status = 'success'
|
||||
this.list[name].result = file_url_data[0]
|
||||
} else {
|
||||
this.list[name].status = 'error'
|
||||
}
|
||||
|
||||
if (Object.entries(this.list).filter(el => el[1].status == 'idle').length) {
|
||||
|
|
Loading…
Reference in New Issue