@@ -42,17 +42,18 @@ import { environment } from 'src/environments/environment';
4242 providedIn : 'root' ,
4343} )
4444export class InstitutionsAdminService {
45- private jsonApiService = inject ( JsonApiService ) ;
45+ private readonly jsonApiService = inject ( JsonApiService ) ;
46+ private readonly apiUrl = `${ environment . apiDomainUrl } /v2` ;
4647
4748 fetchDepartments ( institutionId : string ) : Observable < InstitutionDepartment [ ] > {
4849 return this . jsonApiService
49- . get < InstitutionDepartmentsJsonApi > ( `${ environment . apiUrl } /institutions/${ institutionId } /metrics/departments/` )
50+ . get < InstitutionDepartmentsJsonApi > ( `${ this . apiUrl } /institutions/${ institutionId } /metrics/departments/` )
5051 . pipe ( map ( ( res ) => mapInstitutionDepartments ( res ) ) ) ;
5152 }
5253
5354 fetchSummary ( institutionId : string ) : Observable < InstitutionSummaryMetrics > {
5455 return this . jsonApiService
55- . get < InstitutionSummaryMetricsJsonApi > ( `${ environment . apiUrl } /institutions/${ institutionId } /metrics/summary/` )
56+ . get < InstitutionSummaryMetricsJsonApi > ( `${ this . apiUrl } /institutions/${ institutionId } /metrics/summary/` )
5657 . pipe ( map ( ( result ) => mapInstitutionSummaryMetrics ( result . data . attributes ) ) ) ;
5758 }
5859
@@ -71,7 +72,7 @@ export class InstitutionsAdminService {
7172 } ;
7273
7374 return this . jsonApiService
74- . get < InstitutionUsersJsonApi > ( `${ environment . apiUrl } /institutions/${ institutionId } /metrics/users/` , params )
75+ . get < InstitutionUsersJsonApi > ( `${ this . apiUrl } /institutions/${ institutionId } /metrics/users/` , params )
7576 . pipe (
7677 map ( ( response ) => ( {
7778 users : mapInstitutionUsers ( response as InstitutionUsersJsonApi ) ,
@@ -105,23 +106,23 @@ export class InstitutionsAdminService {
105106 } ;
106107
107108 return this . jsonApiService
108- . get < InstitutionIndexValueSearchJsonApi > ( `${ environment . shareDomainUrl } /index-value-search` , params )
109+ . get < InstitutionIndexValueSearchJsonApi > ( `${ environment . shareTroveUrl } /index-value-search` , params )
109110 . pipe ( map ( ( response ) => mapIndexCardResults ( response ?. included ) ) ) ;
110111 }
111112
112113 sendMessage ( request : SendMessageRequest ) : Observable < SendMessageResponseJsonApi > {
113114 const payload = sendMessageRequestMapper ( request ) ;
114115
115116 return this . jsonApiService . post < SendMessageResponseJsonApi > (
116- `${ environment . apiUrl } /users/${ request . userId } /messages/` ,
117+ `${ this . apiUrl } /users/${ request . userId } /messages/` ,
117118 payload
118119 ) ;
119120 }
120121
121122 requestProjectAccess ( request : RequestProjectAccessData ) : Observable < void > {
122123 const payload = requestProjectAccessMapper ( request ) ;
123124
124- return this . jsonApiService . post < void > ( `${ environment . apiUrl } /nodes/${ request . projectId } /requests/` , payload ) ;
125+ return this . jsonApiService . post < void > ( `${ this . apiUrl } /nodes/${ request . projectId } /requests/` , payload ) ;
125126 }
126127
127128 private fetchIndexCards (
@@ -131,7 +132,7 @@ export class InstitutionsAdminService {
131132 sort = '-dateModified' ,
132133 cursor = ''
133134 ) : Observable < AdminInstitutionSearchResult > {
134- const url = `${ environment . shareDomainUrl } /index-card-search` ;
135+ const url = `${ environment . shareTroveUrl } /index-card-search` ;
135136 const affiliationParam = institutionIris . join ( ',' ) ;
136137
137138 const params : Record < string , string > = {
0 commit comments