mirror of
https://github.com/certd/certd.git
synced 2026-04-24 12:27:25 +08:00
chore: oauth-second
This commit is contained in:
@@ -229,3 +229,14 @@ export class SysSafeSetting extends BaseSettings {
|
||||
}
|
||||
|
||||
|
||||
export class SysOauthSetting extends BaseSettings {
|
||||
static __title__ = 'OAuth设置';
|
||||
static __key__ = 'sys.oauth';
|
||||
static __access__ = 'private';
|
||||
|
||||
oauths: Record<string, {
|
||||
type: string;
|
||||
title: string;
|
||||
addonId: number;
|
||||
}> = {};
|
||||
}
|
||||
|
||||
@@ -187,4 +187,14 @@ export class AddonService extends BaseService<AddonEntity> {
|
||||
});
|
||||
return this.buildAddonInstanceConfig(res);
|
||||
}
|
||||
|
||||
async getOneByType(req:{addonType:string,type:string,userId:number}) {
|
||||
return await this.repository.findOne({
|
||||
where: {
|
||||
addonType: req.addonType,
|
||||
type: req.type,
|
||||
userId: req.userId
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user