Skip to content

Commit

Permalink
fix: NO_LIMIT_SEND_ROLE when user settings not call (#396)
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamhunter2333 authored Aug 11, 2024
1 parent c6d0307 commit 7e5d142
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<!-- markdownlint-disable-file MD004 MD024 MD034 MD036 -->
# CHANGE LOG

## main(v0.7.2)

- fix: worker 增加 `NO_LIMIT_SEND_ROLE` 配置, 有时加载失败的问题

## v0.7.1

- fix: 修复用户角色加载失败的问题
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cloudflare_temp_email",
"version": "0.7.1",
"version": "0.7.2",
"private": true,
"type": "module",
"scripts": {
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/views/Admin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { onMounted } from 'vue';
import { useI18n } from 'vue-i18n'
import { useGlobalState } from '../store'
import { api } from '../api'
import SenderAccess from './admin/SenderAccess.vue'
import Statistics from "./admin/Statistics.vue"
Expand All @@ -22,7 +23,7 @@ import Webhook from './admin/Webhook.vue';
const {
adminAuth, showAdminAuth, adminTab, loading,
globalTabplacement, showAdminPage
globalTabplacement, showAdminPage, userSettings
} = useGlobalState()
const message = useMessage()
Expand Down Expand Up @@ -86,6 +87,8 @@ onMounted(async () => {
showAdminAuth.value = true;
return;
}
// make sure user_id is fetched
if (!userSettings.value.user_id) await api.getUserSettings(message);
})
</script>

Expand Down
4 changes: 3 additions & 1 deletion frontend/src/views/index/SendMail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const isPreview = ref(false)
const editorRef = shallowRef()
const { settings, sendMailModel, indexTab } = useGlobalState()
const { settings, sendMailModel, indexTab, userSettings } = useGlobalState()
const { t } = useI18n({
locale: 'zh',
Expand Down Expand Up @@ -136,6 +136,8 @@ const handleCreated = (editor) => {
}
onMounted(async () => {
// make sure user_id is fetched
if (!userSettings.value.user_id) await api.getUserSettings(message);
await api.getSettings();
})
</script>
Expand Down
2 changes: 1 addition & 1 deletion worker/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const CONSTANTS = {
VERSION: 'v0.7.1',
VERSION: 'v0.7.2',

// DB settings
ADDRESS_BLOCK_LIST_KEY: 'address_block_list',
Expand Down

0 comments on commit 7e5d142

Please sign in to comment.