Skip to content
This repository was archived by the owner on Jul 28, 2020. It is now read-only.

Commit 0b85c2f

Browse files
committed
Update gateway url.
1 parent 765c496 commit 0b85c2f

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/async/Client.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const ZENATON_WORKER_URL = "http://localhost";
1111
const DEFAULT_WORKER_PORT = 4001;
1212
const WORKER_API_VERSION = "v_newton";
1313

14-
const ZENATON_ALFRED_URL = "https://alfred.zenaton.com/api";
14+
const ZENATON_GATEWAY_URL = "https://gateway.zenaton.com/api";
1515

1616
const APP_ENV = "app_env";
1717
const APP_ID = "app_id";
@@ -115,10 +115,10 @@ module.exports = class Client {
115115
return `${host}${path}`;
116116
}
117117

118-
getAlfredUrl() {
119-
const host = process.env.ZENATON_ALFRED_URL
120-
? process.env.ZENATON_ALFRED_URL
121-
: ZENATON_ALFRED_URL;
118+
getGatewayUrl() {
119+
const host = process.env.ZENATON_GATEWAY_URL
120+
? process.env.ZENATON_GATEWAY_URL
121+
: ZENATON_GATEWAY_URL;
122122

123123
return host;
124124
}
@@ -146,7 +146,7 @@ module.exports = class Client {
146146
}
147147

148148
async startScheduledTask(task) {
149-
const endpoint = this.getAlfredUrl();
149+
const endpoint = this.getGatewayUrl();
150150
const taskBody = this.getBodyForTask(task);
151151
const mutation = graphQL.mutations.createTaskSchedule;
152152
const variables = {
@@ -189,7 +189,7 @@ module.exports = class Client {
189189
}
190190

191191
async startScheduledWorkflow(flow) {
192-
const endpoint = this.getAlfredUrl();
192+
const endpoint = this.getGatewayUrl();
193193
const workflowBody = this.getBodyForWorkflow(flow);
194194
const mutation = graphQL.mutations.createWorkflowSchedule;
195195
const variables = {

test/async/Client.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ describe("Client", () => {
111111
expect(serializer.encode).to.have.been.calledWithExactly("WHATEVER");
112112

113113
expect(graphQL.request).to.have.been.calledWithExactly(
114-
"https://alfred.zenaton.com/api",
114+
"https://gateway.zenaton.com/api",
115115
graphQL.mutations.createWorkflowSchedule,
116116
{
117117
createWorkflowScheduleInput: {
@@ -184,7 +184,7 @@ describe("Client", () => {
184184
expect(serializer.encode).to.have.been.calledWithExactly("WHATEVER");
185185

186186
expect(graphQL.request).to.have.been.calledWithExactly(
187-
"https://alfred.zenaton.com/api",
187+
"https://gateway.zenaton.com/api",
188188
graphQL.mutations.createTaskSchedule,
189189
{
190190
createTaskScheduleInput: {

0 commit comments

Comments
 (0)