File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
frontend/src/app/services Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -603,11 +603,17 @@ export class ApiService {
603603 ) ;
604604 }
605605
606- getAngorProjectInvestments ( angorId : string , from : number , limit : number ) : Observable < AngorProjectInvestment [ ] > {
606+ getAngorProjectInvestments ( angorId : string , from ?: number , limit ?: number ) : Observable < AngorProjectInvestment [ ] > {
607+ const queryParams = new URLSearchParams ( ) ;
608+ if ( from ) {
609+ queryParams . append ( 'offset' , from . toString ( ) ) ;
610+ }
611+ if ( limit ) {
612+ queryParams . append ( 'limit' , limit . toString ( ) ) ;
613+ }
614+ const queryString = queryParams . toString ( ) ;
607615 return this . httpClient . get < AngorProjectInvestment [ ] > (
608- this . apiBaseUrl + this . apiBasePath + '/api/v1/query/Angor/projects/' + angorId + '/investments' +
609- ( from == undefined ? '' : '?offset=' + from ) +
610- ( limit == undefined ? '' : '&limit=' + limit )
616+ this . apiBaseUrl + this . apiBasePath + '/api/v1/query/Angor/projects/' + angorId + '/investments/' + queryString
611617 ) ;
612618 }
613619}
You can’t perform that action at this time.
0 commit comments