Update getData
This commit is contained in:
parent
32b5f697c5
commit
32d76e2328
@ -264,8 +264,8 @@ export default class MessageBus {
|
||||
});
|
||||
}
|
||||
|
||||
public getData(processId: string, stateId: string): Promise<any> {
|
||||
return new Promise<any>((resolve: (data: any) => void, reject: (error: string) => void) => {
|
||||
public getData(processId: string, stateId: string): Promise<Record<string, any>> {
|
||||
return new Promise<Record<string, any>>((resolve: (data: Record<string, any>) => void, reject: (error: string) => void) => {
|
||||
this.checkToken().then(() => {
|
||||
const userStore = UserStore.getInstance();
|
||||
const accessToken = userStore.getAccessToken()!;
|
||||
@ -273,7 +273,7 @@ export default class MessageBus {
|
||||
const correlationId = uuidv4();
|
||||
this.initMessageListener(correlationId);
|
||||
|
||||
const unsubscribe = EventBus.getInstance().on('DATA_RETRIEVED', (responseId: string, data: any) => {
|
||||
const unsubscribe = EventBus.getInstance().on('DATA_RETRIEVED', (responseId: string, data: Record<string, any>) => {
|
||||
if (responseId !== correlationId) {
|
||||
return;
|
||||
}
|
||||
@ -295,7 +295,7 @@ export default class MessageBus {
|
||||
type: 'RETRIEVE_DATA',
|
||||
processId,
|
||||
stateId,
|
||||
token: accessToken
|
||||
accessToken
|
||||
});
|
||||
}).catch(console.error);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user