Skip to content

Commit 23e5680

Browse files
walmslesm-walmsley
andauthored
feat(callabackUrl): Provide getter for the socket callbackUrl (#7)
* feat(callabckUrl): Provide getter for the socket callabckUrl to enable re-use * fix(API doc): updated API.md from build pocess --------- Co-authored-by: Michael Walmsley <[email protected]>
1 parent e9dcc32 commit 23e5680

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

API.md

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/socket-tasks/socket-tasks.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ export class SocketTasks extends SocketApi {
8686
this.configureTasks(config);
8787
}
8888

89+
public socketCallbackUrl(): string {
90+
return this.socketStage.callbackUrl;
91+
}
92+
8993
/**
9094
* Configures the Task destinations. Creates the Lambda Destination config and creates the EventBus rule pattern to ensure the Lambda function is triggered.
9195
* @param config - Configuration holds the `taskFunctions` which is an array of tasks to be processed and configured for the SocketTasks instance.
@@ -154,7 +158,7 @@ export class SocketTasks extends SocketApi {
154158
runtime: Runtime.NODEJS_18_X,
155159
initialPolicy: [socketApiPolicy],
156160
environment: {
157-
WEBSOCKET_API: this.socketStage.callbackUrl,
161+
WEBSOCKET_API: this.socketCallbackUrl(),
158162
},
159163
});
160164

0 commit comments

Comments
 (0)