优化代码

This commit is contained in:
GoEdgeLab
2022-07-22 14:35:17 +08:00
parent 384de90f00
commit 95e849c998
80 changed files with 462 additions and 463 deletions

View File

@@ -15,7 +15,7 @@ type HTTPAuthPolicyService struct {
// CreateHTTPAuthPolicy 创建策略
func (this *HTTPAuthPolicyService) CreateHTTPAuthPolicy(ctx context.Context, req *pb.CreateHTTPAuthPolicyRequest) (*pb.CreateHTTPAuthPolicyResponse, error) {
_, err := this.ValidateAdmin(ctx, 0)
_, err := this.ValidateAdmin(ctx)
if err != nil {
return nil, err
}
@@ -30,7 +30,7 @@ func (this *HTTPAuthPolicyService) CreateHTTPAuthPolicy(ctx context.Context, req
// UpdateHTTPAuthPolicy 修改策略
func (this *HTTPAuthPolicyService) UpdateHTTPAuthPolicy(ctx context.Context, req *pb.UpdateHTTPAuthPolicyRequest) (*pb.RPCSuccess, error) {
_, err := this.ValidateAdmin(ctx, 0)
_, err := this.ValidateAdmin(ctx)
if err != nil {
return nil, err
}
@@ -45,7 +45,7 @@ func (this *HTTPAuthPolicyService) UpdateHTTPAuthPolicy(ctx context.Context, req
// FindEnabledHTTPAuthPolicy 查找策略信息
func (this *HTTPAuthPolicyService) FindEnabledHTTPAuthPolicy(ctx context.Context, req *pb.FindEnabledHTTPAuthPolicyRequest) (*pb.FindEnabledHTTPAuthPolicyResponse, error) {
_, err := this.ValidateAdmin(ctx, 0)
_, err := this.ValidateAdmin(ctx)
if err != nil {
return nil, err
}