chore: plus

This commit is contained in:
xiaojunnuo
2025-04-17 13:41:08 +08:00
parent d5d54d4d3b
commit 8e50e5dee3
6 changed files with 55 additions and 29 deletions
@@ -2,6 +2,7 @@ import {ALL, Body, Controller, Inject, Post, Provide} from '@midwayjs/core';
import {BaseController, SysSafeSetting} from '@certd/lib-server';
import {cloneDeep} from 'lodash-es';
import {SafeService} from "../../../modules/sys/settings/safe-service.js";
import {isPlus} from "@certd/plus-core";
/**
@@ -24,6 +25,9 @@ export class SysSettingsController extends BaseController {
@Post("/save", { summary: "sys:settings:edit" })
async safeSave(@Body(ALL) body: any) {
if (!isPlus()) {
throw new Error('本功能需要开通专业版')
}
await this.safeService.saveSafeSetting(body);
return this.ok({});
}