diff --git a/src/components/Registration.js b/src/components/Registration.js index f3efe43..cd54496 100644 --- a/src/components/Registration.js +++ b/src/components/Registration.js @@ -56,6 +56,24 @@ function Registration() { }); } + const clearsUsers = () => { + setMessage(""); + axios({ + method: 'get', + url: "https://asia-south1-hpos-preprod.cloudfunctions.net/clearUsers", + withCredentials: false, + secure: false, + headers: { + "Content-Type": "application/json", + "x-client": "e16a1bd15af2ee640f5a7a18c8d8333f5f01f7c66e003bbc21ee52870f1bce27", + }, + }) + .then(response => response.data) + .then((data) => { + setMessage(`${JSON.stringify(data)}`); + }); + } + const onNameChange = (event) => { setName(event.target.value); } @@ -69,6 +87,9 @@ function Registration() {
createUser()}>Create User
+
+
clearsUsers()}>Clear Users
+
{message &&
{message}
}
);