@@ -53,7 +53,6 @@ import {
5353 generateAutoCaptions ,
5454} from './util/muxApi' ;
5555import Sidebar from './locations/Sidebar' ;
56- import { APP_ORGANIZATION_ID , isMarketplaceVersion } from './util/constants' ;
5756
5857const delay = ( ms : number ) => new Promise ( ( resolve ) => setTimeout ( resolve , ms ) ) ;
5958
@@ -105,7 +104,6 @@ export class App extends React.Component<AppProps, AppState> {
105104 muxPlayerRef = React . createRef < any > ( ) ; // eslint-disable-line @typescript-eslint/no-explicit-any
106105 getSignedTokenActionId : string ;
107106 private pollPending = false ;
108- orgId : string ;
109107
110108 constructor ( props : AppProps ) {
111109 super ( props ) ;
@@ -153,10 +151,6 @@ export class App extends React.Component<AppProps, AppState> {
153151 storyboardToken : undefined ,
154152 raw : undefined ,
155153 } ;
156-
157- this . orgId = isMarketplaceVersion ( { appId : this . props . sdk . ids . app } )
158- ? APP_ORGANIZATION_ID
159- : this . props . sdk . ids . organization ;
160154 }
161155
162156 // eslint-disable-next-line @typescript-eslint/ban-types
@@ -212,9 +206,9 @@ export class App extends React.Component<AppProps, AppState> {
212206 } ;
213207
214208 async componentDidMount ( ) {
215- const appActionsResponse = await this . cmaClient . appAction . getMany ( {
216- organizationId : this . orgId ,
217- appDefinitionId : this . props . sdk . ids . app ! ,
209+ const appActionsResponse = await this . cmaClient . appAction . getManyForEnvironment ( {
210+ environmentId : this . props . sdk . ids . environment ,
211+ spaceId : this . props . sdk . ids . space ,
218212 } ) ;
219213 this . getSignedTokenActionId =
220214 appActionsResponse . items . find ( ( x ) => x . name === 'getSignedUrlTokens' ) ?. sys . id ?? '' ;
@@ -509,7 +503,7 @@ export class App extends React.Component<AppProps, AppState> {
509503 response : { body } ,
510504 } = await this . cmaClient . appActionCall . createWithResponse (
511505 {
512- organizationId : this . orgId ,
506+ organizationId : this . props . sdk . ids . organization ,
513507 appDefinitionId : this . props . sdk . ids . app ! ,
514508 appActionId : this . getSignedTokenActionId ,
515509 } ,
0 commit comments