mirror of
https://github.com/certd/certd.git
synced 2026-04-15 05:00:52 +08:00
feat: 邮件通知
This commit is contained in:
@@ -187,14 +187,19 @@ export abstract class BaseService<T> {
|
||||
return await qb.getMany();
|
||||
}
|
||||
|
||||
async checkUserId(id = 0, userId, userKey = 'userId') {
|
||||
async checkUserId(
|
||||
id: any = 0,
|
||||
userId,
|
||||
userKey = 'userId',
|
||||
queryIdKey = 'id'
|
||||
) {
|
||||
// @ts-ignore
|
||||
const res = await this.getRepository().findOne({
|
||||
// @ts-ignore
|
||||
select: { [userKey]: true },
|
||||
// @ts-ignore
|
||||
where: {
|
||||
// @ts-ignore
|
||||
id,
|
||||
[queryIdKey]: id,
|
||||
},
|
||||
});
|
||||
// @ts-ignore
|
||||
|
||||
Reference in New Issue
Block a user