mirror of
				https://github.com/TeaOSLab/EdgeAPI.git
				synced 2025-11-04 16:00:24 +08:00 
			
		
		
		
	优化接口权限
This commit is contained in:
		@@ -177,7 +177,7 @@ func (this *IPLibraryService) DeleteIPLibrary(ctx context.Context, req *pb.Delet
 | 
			
		||||
// LookupIPRegion 查询某个IP信息
 | 
			
		||||
func (this *IPLibraryService) LookupIPRegion(ctx context.Context, req *pb.LookupIPRegionRequest) (*pb.LookupIPRegionResponse, error) {
 | 
			
		||||
	// 校验请求
 | 
			
		||||
	_, _, err := this.ValidateAdminAndUser(ctx)
 | 
			
		||||
	_, _, err := this.ValidateAdminAndUser(ctx, true)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
@@ -202,7 +202,7 @@ func (this *IPLibraryService) LookupIPRegion(ctx context.Context, req *pb.Lookup
 | 
			
		||||
// LookupIPRegions 查询一组IP信息
 | 
			
		||||
func (this *IPLibraryService) LookupIPRegions(ctx context.Context, req *pb.LookupIPRegionsRequest) (*pb.LookupIPRegionsResponse, error) {
 | 
			
		||||
	// 校验请求
 | 
			
		||||
	_, _, err := this.ValidateAdminAndUser(ctx)
 | 
			
		||||
	_, _, err := this.ValidateAdminAndUser(ctx, true)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user