File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 PermissionValidationRequestItem ,
66 PermissionValidationResponseItem ,
77} from '@src/authz/types' ;
8- import { getApiUrl } from './utils' ;
8+ import { getConfig } from '@edx/frontend-platform' ;
9+
10+ export const getAuthzApiUrl = ( path : string ) => `${ getConfig ( ) . STUDIO_BASE_URL } /api/authz/${ path || '' } ` ;
911
1012export const validateUserPermissions = async (
1113 query : PermissionValidationQuery ,
@@ -14,7 +16,7 @@ export const validateUserPermissions = async (
1416 const request : PermissionValidationRequestItem [ ] = Object . values ( query ) ;
1517
1618 const { data } : { data : PermissionValidationResponseItem [ ] } = await getAuthenticatedHttpClient ( ) . post (
17- getApiUrl ( '/api/authz/ v1/permissions/validate/me') ,
19+ getAuthzApiUrl ( ' v1/permissions/validate/me') ,
1820 request ,
1921 ) ;
2022
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments