Skip to content

Commit

Permalink
Merge pull request #70 from 67P/chore/update_dependencies
Browse files Browse the repository at this point in the history
Update dependencies (incl. new contracts)
  • Loading branch information
raucao authored Aug 14, 2023
2 parents c196ded + dabd997 commit 90bb475
Show file tree
Hide file tree
Showing 3 changed files with 1,671 additions and 2,135 deletions.
9 changes: 4 additions & 5 deletions integrations/github.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const util = require('util');
const fetch = require('node-fetch');
const session = require('express-session');
const grant = require('grant-express');
const cors = require('cors');
const grant = require('grant').express();
const amountFromLabels = require('./utils/amount-from-labels');
const kindFromLabels = require('./utils/kind-from-labels');

Expand Down Expand Up @@ -184,11 +184,10 @@ module.exports = async function(robot, kredits) {
if (process.env.KREDITS_GITHUB_KEY && process.env.KREDITS_GITHUB_SECRET) {
const grantConfig = {
defaults: {
protocol: (process.env.KREDITS_GRANT_PROTOCOL || "http"),
host: (process.env.KREDITS_GRANT_HOST || 'localhost:8888'),
origin: (process.env.KREDITS_GRANT_ORIGIN || 'http://localhost:8888'),
prefix: '/kredits/signup/connect',
transport: 'session',
response: 'tokens',
path: '/kredits/signup'
},
github: {
key: process.env.KREDITS_GITHUB_KEY,
Expand All @@ -203,7 +202,7 @@ module.exports = async function(robot, kredits) {
saveUninitialized: false
}));

robot.router.use('/kredits/signup', grant(grantConfig));
robot.router.use(grant(grantConfig));

robot.router.get('/kredits/signup/github', async (req, res) => {
const access_token = req.session.grant.response.access_token;
Expand Down
Loading

0 comments on commit 90bb475

Please sign in to comment.