diff --git a/static/src/js/helpers/reverser.js b/static/src/js/helpers/reverser.js index 0c6f502..e4420e5 100644 --- a/static/src/js/helpers/reverser.js +++ b/static/src/js/helpers/reverser.js @@ -1,11 +1,19 @@ -export default function Reverser(ident) { +export default function Reverser(ident, args) { + let body = {}; + if (ident) { + body.ident = ident; + } + if (args) { + body.args = args; + } + body = JSON.stringify(body); return fetch('/reverse/', { method: 'post', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }, - body: JSON.stringify({ident}) + body }).then(function (response) { if (response.status === 302) { return response;