mirror of
https://github.com/certd/certd.git
synced 2026-04-23 19:57:27 +08:00
chore: 优化
This commit is contained in:
@@ -3,7 +3,6 @@ import { merge } from 'lodash-es';
|
||||
import { CrudController } from '@certd/lib-server';
|
||||
import { PluginService } from '../../../modules/plugin/service/plugin-service.js';
|
||||
import { CommPluginConfig, PluginConfigService } from '../../../modules/plugin/service/plugin-config-service.js';
|
||||
|
||||
/**
|
||||
* 插件
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { ALL, Body, Controller, Inject, Post, Provide, Query } from '@midwayjs/core';
|
||||
import { CrudController, SysPrivateSettings, SysPublicSettings, SysSettingsEntity, SysSettingsService } from '@certd/lib-server';
|
||||
import * as _ from 'lodash-es';
|
||||
import { merge } from 'lodash-es';
|
||||
import { PipelineService } from '../../../modules/pipeline/service/pipeline-service.js';
|
||||
import { UserSettingsService } from '../../../modules/mine/service/user-settings-service.js';
|
||||
@@ -9,6 +8,7 @@ import { http, logger, simpleNanoId } from '@certd/basic';
|
||||
import { CodeService } from '../../../modules/basic/service/code-service.js';
|
||||
import { SmsServiceFactory } from '../../../modules/basic/sms/factory.js';
|
||||
|
||||
|
||||
/**
|
||||
*/
|
||||
@Provide()
|
||||
@@ -99,8 +99,8 @@ export class SysSettingsController extends CrudController<SysSettingsService> {
|
||||
async saveSysSettings(@Body(ALL) body: { public: SysPublicSettings; private: SysPrivateSettings }) {
|
||||
const publicSettings = await this.service.getPublicSettings();
|
||||
const privateSettings = await this.service.getPrivateSettings();
|
||||
_.merge(publicSettings, body.public);
|
||||
_.merge(privateSettings, body.private);
|
||||
merge(publicSettings, body.public);
|
||||
merge(privateSettings, body.private);
|
||||
await this.service.savePublicSettings(publicSettings);
|
||||
await this.service.savePrivateSettings(privateSettings);
|
||||
return this.ok({});
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
var axios = require('axios');
|
||||
var FormData = require('form-data');
|
||||
var data = new FormData();
|
||||
data.append('login_name', 'Admin');
|
||||
data.append('passwd', 'jM5eKu5uq!@3Ibyy');
|
||||
data.append('locale_id', 'default');
|
||||
|
||||
var config = {
|
||||
method: 'post',
|
||||
url: 'https://vps-b6941c0f.vps.ovh.net:8443/login_up.php',
|
||||
headers: {
|
||||
'User-Agent': 'Apifox/1.0.0 (https://apifox.com)',
|
||||
Accept: '*/*',
|
||||
Host: 'vps-b6941c0f.vps.ovh.net:8443',
|
||||
Connection: 'keep-alive',
|
||||
Referer: 'https://vps-b6941c0f.vps.ovh.net:8443/login.php',
|
||||
...data.getHeaders(),
|
||||
},
|
||||
data: data,
|
||||
};
|
||||
|
||||
axios(config)
|
||||
.then(function (response) {
|
||||
console.log(JSON.stringify(response.data));
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
Reference in New Issue
Block a user