Skip to content

Commit

Permalink
added json formatting or result
Browse files Browse the repository at this point in the history
  • Loading branch information
isuru117 committed Oct 16, 2019
1 parent 859edb2 commit bb7d4af
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions back-end/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require('dotenv').config();
const port = process.env.PORT;
const octokit = new Octokit({ auth: process.env.SECRET });

var dataSet;
var dataSet={};

app.get('/', async (req, res) => {

Expand All @@ -24,7 +24,7 @@ app.get('/', async (req, res) => {
repo: repoName
});

let fetchedContributors = ["aa"];
let fetchedContributors = [repoName];

result.data.map(contributor => {
if (fetchedContributors.length != 0) {
Expand All @@ -36,7 +36,8 @@ app.get('/', async (req, res) => {
}
});

console.log(fetchedContributors);

dataSet[repoName]=fetchedContributors;
});
res.send("<h1>" + dataSet + "</h1>");

Expand Down

0 comments on commit bb7d4af

Please sign in to comment.