Skip to content

Commit

Permalink
Merge branch 'master' of github.com:moleculerjs/moleculer-web
Browse files Browse the repository at this point in the history
  • Loading branch information
icebob committed Jan 9, 2022
2 parents 7a07f42 + 6fba027 commit 7328218
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/test.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ module.exports = {
rest: ""
},

events: {
"$api.aliases.regenerated"() {
this.logger.info("Aliases regenerated!");
}
},

actions: {
hello: {
rest: "GET /hello",
Expand Down
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1670,6 +1670,8 @@ module.exports = {
this.regenerateAllAutoAliases = _.debounce(() => {
/* istanbul ignore next */
this.routes.forEach(route => route.opts.autoAliases && this.regenerateAutoAliases(route));

this.broker.broadcast("$api.aliases.regenerated");
}, debounceTime);
},

Expand Down

0 comments on commit 7328218

Please sign in to comment.