add clearusers api
This commit is contained in:
@@ -13,4 +13,17 @@
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.clear-button {
|
||||
background-color: #b62200;
|
||||
/* Green */
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 15px 0px 0px 0px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
margin: 5px;
|
||||
}
|
||||
@@ -53,6 +53,10 @@ function Registration() {
|
||||
.then(response => response.data)
|
||||
.then((data) => {
|
||||
setMessage(`${id} is being created`);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
setMessage(`error: ${err?.message}`);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -65,12 +69,16 @@ function Registration() {
|
||||
secure: false,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"x-client": "e16a1bd15af2ee640f5a7a18c8d8333f5f01f7c66e003bbc21ee52870f1bce27",
|
||||
// "x-client": "e16a1bd15af2ee640f5a7a18c8d8333f5f01f7c66e003bbc21ee52870f1bce27",
|
||||
},
|
||||
})
|
||||
.then(response => response.data)
|
||||
.then((data) => {
|
||||
setMessage(`${JSON.stringify(data)}`);
|
||||
setMessage(`${data}`);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
setMessage(`error: ${err?.message}`);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -88,7 +96,7 @@ function Registration() {
|
||||
<div className='button' onClick={() => createUser()}>Create User</div>
|
||||
</div>
|
||||
<div className='dates'>
|
||||
<div className='button' onClick={() => clearsUsers()}>Clear Users</div>
|
||||
<div className='clear-button' onClick={() => clearsUsers()}>Clear</div>
|
||||
</div>
|
||||
<div>{message && <div className='message'>{message}</div>}</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user