mirror of
https://github.com/certd/certd.git
synced 2026-04-23 19:57:27 +08:00
Merge branch 'v2-dev' into v2-plugin
This commit is contained in:
@@ -58,6 +58,7 @@ export class CnameRecordService extends BaseService<CnameRecordEntity> {
|
||||
if (param.domain.startsWith('*.')) {
|
||||
param.domain = param.domain.substring(2);
|
||||
}
|
||||
param.domain = param.domain.trim()
|
||||
const info = await this.getRepository().findOne({ where: { domain: param.domain,userId: param.userId } });
|
||||
if (info) {
|
||||
return info;
|
||||
|
||||
@@ -7,7 +7,7 @@ import { cloneDeep } from 'lodash-es';
|
||||
export class BuiltInPluginService {
|
||||
getList() {
|
||||
const collection = pluginRegistry.storage;
|
||||
const list = [];
|
||||
let list = [];
|
||||
for (const key in collection) {
|
||||
const Plugin = collection[key];
|
||||
if (Plugin?.define?.deprecated) {
|
||||
@@ -15,11 +15,21 @@ export class BuiltInPluginService {
|
||||
}
|
||||
list.push({ ...Plugin.define, key });
|
||||
}
|
||||
list = list.sort((a, b) => {
|
||||
return (a.order ?? 10 )- (b.order ?? 10);
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
||||
getGroups() {
|
||||
return cloneDeep(pluginGroups);
|
||||
const groups:any = cloneDeep(pluginGroups);
|
||||
for (const key in groups) {
|
||||
const group = groups[key];
|
||||
group.plugins = group.plugins.sort((a, b) => {
|
||||
return (a.order ?? 10 )- (b.order ?? 10);
|
||||
});
|
||||
}
|
||||
return groups;
|
||||
}
|
||||
|
||||
getByType(type: string) {
|
||||
|
||||
Reference in New Issue
Block a user