Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: delete_address not delete address_sender #153

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/docs_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- main
tags:
- "*"
workflow_dispatch:

jobs:
deploy:
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/views/admin/Account.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ const deleteEmail = async () => {
await fetchData()
} catch (error) {
message.error(error.message || "error");
showDelteAccount.value = false
}
}

Expand Down Expand Up @@ -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">
Expand Down
5 changes: 4 additions & 1 deletion worker/src/admin_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
})

Expand Down
5 changes: 4 additions & 1 deletion worker/src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
})

Expand Down