fix: 修复保存站点监控dns设置,偶尔无法保存成功的bug

This commit is contained in:
xiaojunnuo
2026-02-13 22:56:59 +08:00
parent b91548eef4
commit 8387fe0d5b
2 changed files with 7 additions and 7 deletions

View File

@@ -45,15 +45,16 @@
</template>
<script setup lang="tsx">
import { notification } from "ant-design-vue";
import { merge } from "lodash-es";
import { reactive } from "vue";
import * as api from "./api";
import { UserSiteMonitorSetting } from "./api";
import { notification } from "ant-design-vue";
import { merge } from "lodash-es";
import { useSettingStore } from "/src/store/settings";
import NotificationSelector from "/@/views/certd/notification/notification-selector/index.vue";
import { useUserStore } from "/@/store/user";
import { utils } from "/@/utils";
import NotificationSelector from "/@/views/certd/notification/notification-selector/index.vue";
import { useI18n } from "/src/locales";
import { useSettingStore } from "/src/store/settings";
const { t } = useI18n();
@@ -74,6 +75,7 @@ async function loadUserSettings() {
loadUserSettings();
const doSave = async (form: any) => {
await utils.sleep(1);
await api.SiteMonitorSettingsSave({
...formState,
});

View File

@@ -68,7 +68,7 @@ export class UserSettingsController extends CrudController<UserSettingsService>
const entity = await this.service.getByKey(key, this.getUserId());
return this.ok(entity);
}
@Post("/grant/get", { summary: Constants.per.authOnly })
@Post("/grant/get", { summary: Constants.per.authOnly })
async grantSettingsGet() {
const userId = this.getUserId();
const setting = await this.service.getSetting<UserGrantSetting>(userId, UserGrantSetting);
@@ -88,6 +88,4 @@ export class UserSettingsController extends CrudController<UserSettingsService>
return this.ok({});
}
}