Skip to content

Commit

Permalink
fix: Action override in subclass
Browse files Browse the repository at this point in the history
  • Loading branch information
loopingz committed Dec 5, 2023
1 parent 09059da commit 113f5a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/async/src/models.ts
Expand Up @@ -130,7 +130,7 @@ export default class AsyncAction extends CoreModel {
* @returns
*/
public getHookUrl(): string {
return Core.get().getRouter().getModelUrl(this);
return Core.get().getApiUrl(`${Core.get().getRouter().getModelUrl(this)}/${this.uuid}`);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/models/coremodel.ts
Expand Up @@ -1017,7 +1017,8 @@ class CoreModel {
}
clazz = Object.getPrototypeOf(clazz);
}
return actions.reduce((v, c) => ({ ...v, ...c }), {});
// Reduce right to give priority to the last class:
return actions.reduceRight((v, c) => ({ ...v, ...c }), {});
}

/**
Expand Down

0 comments on commit 113f5a6

Please sign in to comment.