| Conditions | 3 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import {nc_fetch_json} from 'nextcloud_fetch'; |
||
| 43 | export function tryVerification (gateway, code) { |
||
| 44 | let url = OC.generateUrl('/apps/twofactor_gateway/settings/{gateway}/verification/finish', { |
||
| 45 | gateway: gateway |
||
| 46 | }) |
||
| 47 | |||
| 48 | return nc_fetch_json(url, { |
||
| 49 | method: 'POST', |
||
| 50 | body: JSON.stringify({ |
||
| 51 | verificationCode: code |
||
| 52 | }) |
||
| 53 | }).then(function (resp) { |
||
| 54 | if (resp.ok) { |
||
| 55 | return resp.json(); |
||
| 56 | } |
||
| 57 | throw resp; |
||
| 58 | }) |
||
| 59 | } |
||
| 60 | |||
| 75 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.