diff --git a/app/components/client/devprogram-scripts.js b/app/components/client/devprogram-scripts.js index 0f2d377..c3a4c18 100644 --- a/app/components/client/devprogram-scripts.js +++ b/app/components/client/devprogram-scripts.js @@ -64,14 +64,17 @@ function syncWithApi(data) { // eslint-disable-line no-unused-vars fetch(`https://api.lbry.com/reward/new?github_token=${code}&reward_type=github_developer&wallet_address=${address}`) .then(response => response.json()) .then(result => { - console.log(result); - switch(true) { case result.error === "this reward is limited to 1 per person": document.querySelector("developer-program").innerHTML = "

You have already claimed this reward. This reward is limited to ONE per person. Your enthusiasm is appreciated.

"; return; + case result.error: + document.querySelector("developer-program").innerHTML = + `

${result.error}

`; + return; + case result.success: result = result.data; document.querySelector("developer-program").innerHTML = @@ -81,7 +84,7 @@ function syncWithApi(data) { // eslint-disable-line no-unused-vars default: console.info(data); // eslint-disable-line no-console document.querySelector("developer-program").innerHTML = - "

The LBRY API might be down. Please try again later.

"; + "

No success or error was received so the LBRY API might be down.
Please try again later.

"; return; } }) diff --git a/app/sockets.js b/app/sockets.js index f73a2ba..b6f4d81 100644 --- a/app/sockets.js +++ b/app/sockets.js @@ -15,11 +15,11 @@ import { generateGitHubFeed } from "~helper/github"; import messageSlack from "~helper/slack"; import { URL } from "url"; -// const githubAppId = process.env.GITHUB_APP_ID; -// const githubAppSecret = process.env.GITHUB_APP_SECRET; +const githubAppId = process.env.GITHUB_APP_ID; +const githubAppSecret = process.env.GITHUB_APP_SECRET; -const githubAppId = process.env.GITHUB_APP_ID_TEST; -const githubAppSecret = process.env.GITHUB_APP_SECRET_TEST; +// const githubAppId = process.env.GITHUB_APP_ID_TEST; +// const githubAppSecret = process.env.GITHUB_APP_SECRET_TEST;