Total Complexity | 2 |
Complexity/F | 1 |
Lines of Code | 11 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import axios from 'axios' |
||
2 | import config from 'config' |
||
3 | |||
4 | export default async function (req, res, next) { |
||
|
|||
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.