chore: oauth-second

This commit is contained in:
xiaojunnuo
2025-11-26 23:25:51 +08:00
parent 5a148aa3b9
commit e9427b4694
14 changed files with 306 additions and 47 deletions
@@ -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
}
});
}
}