1
- import { RuleDTO } from '@/lib/core/dto/rule-dto' ;
2
- import { BaseStreamableDTO } from '@/lib/sdk/dto' ;
3
- import { BaseStreamableEndpoint } from '@/lib/sdk/gateway-endpoints' ;
4
- import { HTTPRequest } from '@/lib/sdk/http' ;
5
- import { Response } from 'node-fetch' ;
6
- import { convertToRuleDTO , ListRulesFilter , TRucioRule } from '../rule-gateway-utils' ;
1
+ import { RuleDTO } from '@/lib/core/dto/rule-dto' ;
2
+ import { BaseStreamableDTO } from '@/lib/sdk/dto' ;
3
+ import { BaseStreamableEndpoint } from '@/lib/sdk/gateway-endpoints' ;
4
+ import { HTTPRequest } from '@/lib/sdk/http' ;
5
+ import { Response } from 'node-fetch' ;
6
+ import { convertToRuleDTO , ListRulesFilter , TRucioRule } from '../rule-gateway-utils' ;
7
7
8
8
const DEFAULT_PARAMETER = '*' ;
9
9
@@ -18,18 +18,18 @@ export default class ListRulesEndpoint extends BaseStreamableEndpoint<BaseStream
18
18
async initialize ( ) : Promise < void > {
19
19
await super . initialize ( ) ;
20
20
const rucioHost = await this . envConfigGateway . rucioHost ( ) ;
21
- const params = {
22
- account : this . filter ?. account ?? DEFAULT_PARAMETER ,
23
- scope : this . filter ?. scope ?? DEFAULT_PARAMETER ,
24
- } ;
25
- const endpoint = `${ rucioHost } /rules?` + new URLSearchParams ( params ) ;
21
+ const endpoint = `${ rucioHost } /rules/` ;
26
22
const request : HTTPRequest = {
27
23
method : 'GET' ,
28
24
url : endpoint ,
29
25
headers : {
30
26
'X-Rucio-Auth-Token' : this . rucioAuthToken ,
31
27
'Content-Type' : 'application/x-json-stream' ,
32
28
} ,
29
+ params : {
30
+ account : this . filter ?. account ?? DEFAULT_PARAMETER ,
31
+ scope : this . filter ?. scope ?? DEFAULT_PARAMETER ,
32
+ }
33
33
} ;
34
34
this . request = request ;
35
35
this . initialized = true ;
0 commit comments