mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-05-07 05:42:50 +08:00
fix: delete_address not delete address_sender (#153)
This commit is contained in:
1
.github/workflows/docs_deploy.yml
vendored
1
.github/workflows/docs_deploy.yml
vendored
@@ -8,6 +8,7 @@ on:
|
||||
- main
|
||||
tags:
|
||||
- "*"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
|
||||
@@ -35,7 +35,7 @@ onMounted(async () => {
|
||||
<template>
|
||||
<n-config-provider :locale="localeConfig" :theme="theme">
|
||||
<n-global-style />
|
||||
<n-spin description="loading..." :show="loading">
|
||||
<n-spin description="loading..." :show="loading" style="z-index: 9999;">
|
||||
<n-message-provider>
|
||||
<n-grid x-gap="12" :cols="12">
|
||||
<n-gi v-if="!isMobile" span="1"></n-gi>
|
||||
|
||||
@@ -81,6 +81,7 @@ const deleteEmail = async () => {
|
||||
await fetchData()
|
||||
} catch (error) {
|
||||
message.error(error.message || "error");
|
||||
showDelteAccount.value = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,7 +215,7 @@ onMounted(async () => {
|
||||
<template #action>
|
||||
</template>
|
||||
</n-modal>
|
||||
<n-modal v-model:show="showDelteAccount" preset="dialog" title="Dialog">
|
||||
<n-modal v-model:show="showDelteAccount" preset="dialog" :title="t('delteAccount')">
|
||||
<p>{{ t('deleteTip') }}</p>
|
||||
<template #action>
|
||||
<n-button @click="deleteEmail" size="small" tertiary round type="error">
|
||||
|
||||
@@ -66,8 +66,11 @@ api.delete('/admin/delete_address/:id', async (c) => {
|
||||
if (!mailSuccess) {
|
||||
return c.text("Failed to delete mails", 500)
|
||||
}
|
||||
const { success: sendAccess } = await c.env.DB.prepare(
|
||||
`DELETE FROM address_sender WHERE address_id = ? `
|
||||
).bind(id).run();
|
||||
return c.json({
|
||||
success: success
|
||||
success: success && mailSuccess && sendAccess
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -220,8 +220,11 @@ api.delete('/api/delete_address', async (c) => {
|
||||
if (!mailSuccess) {
|
||||
return c.text("Failed to delete mails", 500)
|
||||
}
|
||||
const { success: sendAccess } = await c.env.DB.prepare(
|
||||
`DELETE FROM address_sender WHERE address = ? `
|
||||
).bind(address).run();
|
||||
return c.json({
|
||||
success: success
|
||||
success: success && mailSuccess && sendAccess
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user