Skip to content

Commit

Permalink
Merge ee6d4eb into dfa86c8
Browse files Browse the repository at this point in the history
  • Loading branch information
Agupane committed Jun 19, 2019
2 parents dfa86c8 + ee6d4eb commit c5778f8
Show file tree
Hide file tree
Showing 12 changed files with 1,040 additions and 370 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ TELEGRAM_BOT_KEY=YOUR_TELEGRAM_API_KEY
TERMS_OF_SERVICE_URL=http://livepeer.tools/tyc
THRESHOLD_SEND_NOTIFICATION=30
UNSUBSCRIBE_EMAIL_URL=http://livepeer.tools/account
APOLLO_API_URL=https://api.thegraph.com/subgraphs/name/graphprotocol/livepeer
8 changes: 6 additions & 2 deletions config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ const envVarsSchema = Joi.object({
.description('Rinkeby controller address'),
THRESHOLD_SEND_NOTIFICATION: Joi.number()
.required()
.description('Threshold to send notification')
.description('Threshold to send notification'),
APOLLO_API_URL: Joi.string()
.description('Livepeer dgraph API url')
.required()
})
.unknown()
.required()
Expand Down Expand Up @@ -115,7 +118,8 @@ const config = {
envVars.SENDGRID_TEMPLATE_ID_CLAIM_REWARD_UNBONDED_STATE,
mainnetControllerAddress: envVars.MAINNET_CONTROLLER_ADDRESS,
rinkebyControllerAddress: envVars.RINKEBY_CONTROLLER_ADDRESS,
thresholdSendNotification: envVars.THRESHOLD_SEND_NOTIFICATION
thresholdSendNotification: envVars.THRESHOLD_SEND_NOTIFICATION,
apolloApiUrl: envVars.APOLLO_API_URL
}

module.exports = config
1 change: 1 addition & 0 deletions config/param-validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ module.exports = {
},

// GET /api/subscribers/address/:address
// GET /api/delegate/address/:address
getByAddress: {
params: {
address: Joi.string().required()
Expand Down
3 changes: 3 additions & 0 deletions index.route.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const subscribersRouters = require('./server/subscriber/subscriber.route')
const earningsRouters = require('./server/earning/earning.route')
const telegramRouters = require('./server/telegram/telegram.route')
const roundRouters = require('./server/round/round.route')
const delegateRouters = require('./server/delegate/delegate.route')

const router = express.Router() // eslint-disable-line new-cap

Expand All @@ -16,4 +17,6 @@ router.use('/telegrams', telegramRouters)

router.use('/rounds', roundRouters)

router.use('/delegate', delegateRouters)

module.exports = router

0 comments on commit c5778f8

Please sign in to comment.