แก้ fetchListBackup
This commit is contained in:
parent
5891cbed86
commit
52921b8c1e
1 changed files with 16 additions and 13 deletions
|
|
@ -37,21 +37,24 @@ export const useDataStore = defineStore("systemStore", () => {
|
||||||
|
|
||||||
async function fetchListBackup() {
|
async function fetchListBackup() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
|
||||||
.get(config.API.backup)
|
|
||||||
.then((res) => {
|
|
||||||
dataBackUp.value = res.data;
|
|
||||||
|
|
||||||
dataBackUp.value = dataBackUp.value.map((item) => {
|
const res = await http.get(config.API.backup);
|
||||||
return {
|
|
||||||
...item,
|
hideLoader();
|
||||||
status: "สำเร็จ",
|
if (!res) return false;
|
||||||
};
|
|
||||||
});
|
if (res.status === 200) {
|
||||||
})
|
dataBackUp.value = await res.data;
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
dataBackUp.value = dataBackUp.value.map((item) => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
status: "สำเร็จ",
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return res.status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function createBackUp() {
|
async function createBackUp() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue