1 | import axios from 'axios' |
||
2 | import config from 'config' |
||
3 | |||
4 | export default async function (req, res, next) { |
||
0 ignored issues
–
show
|
|||
5 | const url = config.api.url + req.originalUrl |
||
6 | const { headers, data } = await axios.get(url) |
||
7 | Object.keys(headers).forEach((key) => { |
||
8 | res.setHeader(key, headers[key]) |
||
9 | }) |
||
10 | return res.end(data) |
||
11 | } |
||
12 |
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.