ajout d'activité
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { useKeycloak } from "@react-keycloak/web"
|
||||
import { getCoachsAPI, getUsersAPI } from "../requetes"
|
||||
import { getCoachsAPI, getUsersAPI, postAdmin } from "../requetes"
|
||||
import { Admin } from "../classes";
|
||||
|
||||
|
||||
function TestAPI(){
|
||||
@@ -9,9 +10,18 @@ function TestAPI(){
|
||||
getCoachsAPI();
|
||||
}
|
||||
|
||||
function handleSendAdmin(): void {
|
||||
const admin = new Admin;
|
||||
admin.nom = "admin";
|
||||
admin.email = "admin@gmail.com";
|
||||
|
||||
postAdmin(admin);
|
||||
}
|
||||
|
||||
return(
|
||||
<div style={{padding:30, backgroundColor:"#000000"}}>
|
||||
<button onClick={()=>handleGetUsers()}>getUsers</button>
|
||||
<button onClick={()=>handleSendAdmin()}>sendAdmin</button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user