mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-03 23:20:26 +08:00
实现自动匹配证书和批量选择证书功能
This commit is contained in:
@@ -180,10 +180,10 @@ func (this *SSLCertService) CountSSLCerts(ctx context.Context, req *pb.CountSSLC
|
||||
|
||||
var tx = this.NullTx()
|
||||
|
||||
if userId > 0 {
|
||||
userId = req.UserId
|
||||
} else if adminId > 0 {
|
||||
if adminId > 0 {
|
||||
userId = req.UserId
|
||||
} else if userId <= 0 {
|
||||
return nil, errors.New("invalid user")
|
||||
}
|
||||
|
||||
count, err := models.SharedSSLCertDAO.CountCerts(tx, req.IsCA, req.IsAvailable, req.IsExpired, int64(req.ExpiringDays), req.Keyword, userId, req.Domains)
|
||||
@@ -202,10 +202,10 @@ func (this *SSLCertService) ListSSLCerts(ctx context.Context, req *pb.ListSSLCer
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if userId > 0 {
|
||||
userId = req.UserId
|
||||
} else if adminId > 0 {
|
||||
if adminId > 0 {
|
||||
userId = req.UserId
|
||||
} else if userId <= 0 {
|
||||
return nil, errors.New("invalid user")
|
||||
}
|
||||
|
||||
var tx = this.NullTx()
|
||||
|
||||
Reference in New Issue
Block a user