diff --git a/frontend/src/api/watchers.js b/frontend/src/api/watchers.js index efe8ef98..84e5635b 100644 --- a/frontend/src/api/watchers.js +++ b/frontend/src/api/watchers.js @@ -51,7 +51,15 @@ class WatchersApi extends mix(CreateApi, DeleteApi, DetailApi, ListApi, TokenMix .put(`${base}test/`, data, { headers: { Authorization: token } }) .then(response => { toast[response.data.is_new ? 'success' : 'info']( - {response.data.is_new ? 'New item found!' : 'Existing item'}
{response.data.result}
, + + { + response.data.is_new === undefined + ? 'New watcher - test' + : response.data.is_new + ? 'New item found!' : 'Existing item' + }
+ {response.data.result} +
, toastParams ); dispatch(setLoading(false)) diff --git a/frontend/src/app/commands/Watchers.js b/frontend/src/app/commands/Watchers.js index 62f75f1d..48640163 100644 --- a/frontend/src/app/commands/Watchers.js +++ b/frontend/src/app/commands/Watchers.js @@ -477,6 +477,7 @@ const Watchers = () => { onClick={() => dispatch(WatchersApi.test( token, { + name, url, latest: JSON.parse(latest.replace(/[\r\n\t]/g, "")), request: JSON.parse(request.replace(/[\r\n\t]/g, "")), diff --git a/frontend/src/app/user-pages/Register.js b/frontend/src/app/user-pages/Register.js index 06f473fd..c2b31695 100644 --- a/frontend/src/app/user-pages/Register.js +++ b/frontend/src/app/user-pages/Register.js @@ -32,7 +32,9 @@ const Register = () => { { errors?.non_field_errors ? - : null + : !errors?.email && !errors?.password + ? + : null }