Skip to content

Commit

Permalink
perf(backup): catch error when backuping
Browse files Browse the repository at this point in the history
  • Loading branch information
wibus-wee committed Aug 10, 2022
1 parent 34fb907 commit 224b4fe
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/pages/backup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @author: Wibus
* @Date: 2022-08-09 19:16:13
* @LastEditors: Wibus
* @LastEditTime: 2022-08-10 18:08:49
* @LastEditTime: 2022-08-10 18:39:32
* Coding With IU
*/

Expand Down Expand Up @@ -89,16 +89,18 @@ export const Backup: BasicPage = () => {
if (!parsedList.value.length) {
return message.error('请先解析!!')
}
console.log(await apiClientManger("/markdown/import", {
await apiClientManger("/markdown/import", {
method: "POST",
body: {
type: ImportType.Post,
data: parsedList.value,
},
}))

message.success('上传成功!')
fileList.value = []
}).then(() => {
message.success('上传成功!')
fileList.value = []
}).catch((e) => {
message.error(e.message)
})
}

return (
Expand Down

0 comments on commit 224b4fe

Please sign in to comment.