-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapiroute.txt
More file actions
92 lines (81 loc) · 2.9 KB
/
Copy pathapiroute.txt
File metadata and controls
92 lines (81 loc) · 2.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
repository : https://github.com/FranklinCODEX/momohackaton.git
Route::middleware('auth:sanctum')->group(function(){
// ces routes sont protégées donc il faut inclure le token dans la requette pour que ça marche
//souscrire a une assurance
Route::post('/api/createInsurance', );
Body: [
'insurance_type_id' => ['required', 'integer'],
'date_limite' => ['required'],
'insuranceFrequency' => ['required', 'string'],
'insuranceDuration' => ['required', 'string'],
'renouvellement' => ['required', 'string'],
'dateRenouvellement' => ['required'],
'dateDebutContrat' => ['required'],
'fullName' => ['required', 'string'],
'email' => ['required', 'email'],
'phoneNumber' => ['required', 'string'],
'birthday' => ['required'],
'profession' => ['required', 'string'],
'statutionMatrimoniale' => ['required', 'string'],
'cardID' => ['required', 'string'],
'revenuAnnuel' => ['required', 'string'],
]
Response : ['message' => 'Assurance crée avec succès']
//listes type d'assurance
Route::get("api/typeInsurance")
Response :[
typeInsurance => array
]
//mettre a jour son profileImagePath
Route:patch("/api/updateProfile")
Body: [
'fullName' => "string",
'email' => "string",
'password' => "string",
'phoneNumber' => "string",
'profileImagePath' => "string",
'livingAddress' => "string",
'profession' => "string",
'statusMatrimonial' => "string",
'birthday' => "string",
'nationalCardID' => "string",
'revenuAnnuel' => "string",
]
Response: [
"message" => "Information modifier avec succès",
'user' => array
]
//voir les assurances en cours de l'utilisateur connecté
Route::get('api/fetchInsurance')
Response: [
'insurences' => array
]
});
Route::get('api/allTypeInsurence',);
Response : ['typeInsurences' => array ] //listes des assurance disponnible j'ai creer déjà par defaut 3 assurances
Route::post('api/register',);
Body: [
'fullName' => string|required,
'email' => string|required,
'password' => string|required,
'phoneNumber' => string|required,
'profileImagePath' => string,
'livingAddress' => string,
'profession' => string,
'statusMatrimonial' => string,
'birthday' => string,
'nationalCardID' => string,
'revenuAnnuel' => string,
]
Response : ['message' => "Compte creer avec succes"]
Route::post('api/login');
Body : [
'email' => string,
'password' => string,
]
Response : [
'message' => 'Connexion effectuer avec succes',
'token' => string,
'user' => array,
'admin' => boolean
]