We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9e5f69 commit 1fe8716Copy full SHA for 1fe8716
api/download.js
@@ -20,14 +20,16 @@ module.exports = (req, res) => {
20
})
21
.then((r) => r.json())
22
.then((r) => {
23
- const link = r.versions[r['dist-tags'].latest].dist.tarball;
24
- return fetch(link, {
25
- redirect: 'manual',
26
- headers: { authorization },
27
- }).then((r2) => {
28
- res.status(302);
29
- res.setHeader('location', r2.headers.get('location'));
30
- return res.end();
31
- });
+ console.log(r);
+ return r.versions[r['dist-tags'].latest].dist.tarball;
+ })
+ .then((link) => fetch(link, {
+ redirect: 'manual',
+ headers: { authorization },
+ }))
+ .then((r) => {
+ res.status(302);
32
+ res.setHeader('location', r.headers.get('location'));
33
+ return res.end();
34
});
35
};
0 commit comments