Skip to content

Commit 271233d

Browse files
committed
added enironment prop to commmon sources file (base.mjs) and updated delete and creathooks to take in this param
1 parent f7a15ba commit 271233d

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

components/overledger/overledger.app.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,12 @@ export default {
7777
});
7878
},
7979
deleteHook({
80-
path, webhookId,
80+
path, webhookId, ...opts
8181
}) {
8282
return this._makeRequest({
8383
method: "DELETE",
8484
path: `/api/webhooks/${path}/${webhookId}`,
85+
...opts,
8586
});
8687
},
8788
},

components/overledger/sources/common/base.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ import overledger from "../../overledger.app.mjs";
66
export default {
77
props: {
88
overledger,
9+
environment: {
10+
propDefinition: [
11+
overledger,
12+
"environment",
13+
],
14+
},
915
db: "$.service.db",
1016
http: {
1117
type: "$.interface.http",
@@ -35,6 +41,7 @@ export default {
3541
async activate() {
3642
const response = await this.overledger.createHook({
3743
path: this.getPath(),
44+
environment: this.environment,
3845
data: {
3946
location: {
4047
technology: this.locationTechnology,
@@ -51,6 +58,7 @@ export default {
5158
await this.overledger.deleteHook({
5259
path: this.getPath(),
5360
webhookId,
61+
environment: this.environment,
5462
});
5563
},
5664
},

0 commit comments

Comments
 (0)