diff --git a/.gitignore b/.gitignore index 76cbdcd..881f3e9 100644 --- a/.gitignore +++ b/.gitignore @@ -74,11 +74,6 @@ web_modules/ # dotenv environment variable files .env* -.env.development.local -.env.test.local -.env.production.local -.env.local -!.env.development # parcel-bundler cache (https://parceljs.org/) .cache diff --git a/routes/index.js b/routes/index.js index 72ee8ce..190d33c 100644 --- a/routes/index.js +++ b/routes/index.js @@ -30,6 +30,7 @@ const reposToBadge = async (req, res) => { const selectedRepos = (await req.body.repos) || []; const userId = req.body.userId; const provider = req.body.provider; + const repositoryIds = selectedRepos.map((repo) => repo.id); if (!provider) { res.status(400).send("provider missing"); @@ -59,7 +60,7 @@ const reposToBadge = async (req, res) => { user.id, user.name, user.email, - selectedRepos + repositoryIds ); res.status(200).json({ results }); } else if (provider === "gitlab") { @@ -67,7 +68,7 @@ const reposToBadge = async (req, res) => { user.id, user.name, user.email, - selectedRepos + repositoryIds ); res.status(200).json({ results }); } else {