/:schoolID/data
ใช้สำหรับการดูข้อมูลส่วนตัวของแต่ละ User อีกทั้งยังให้ข้อมูลโรงเรียน ที่ user คนนั้นสังกัด และข้อมูลตาม role ของตนเอง ได้แก่ system admin
, school admin
, teacher
, student
โดยเราจะตรวจสอบ user ผ่าน Barear Token ที่ส่งมา
Method GET
Role ที่ใช้ได้ system admin
, school admin
, teacher
, student
content-type application/json
- System admin
- School Admin
- Teacher
- Student
Response
{
"success": true,
"data_user": {
"email": "[email protected]",
"schoolID": "xxxx",
"role": "host",
"status": "Active"
},
"data_role": {
"firstname": "barin",
"lastname": "storm"
},
"data_school": {
"schoolName": "xxxd",
"paymentStatus": "pending",
"status": "pending",
"requests": [
],
"clubs": [
"631c6c83206c37ff705b2931",
"631eed17f75f0547657bc097",
"631eeb0d8cd1164e423f9d5f"
],
"adminID": [
],
"schedule": [
{
"schoolYear": 1995,
"registerDate": "1996-10-29T20:24:00.000Z",
"endOfRegisterDate": "1996-10-29T20:24:00.000Z",
"endOfSchoolYear": "1996-10-29T20:24:00.000Z",
"_id": "631f1504137efb85a40d7c35"
},
{
"schoolYear": 1995,
"registerDate": "1996-10-29T20:24:00.000Z",
"endOfRegisterDate": "1996-10-29T20:24:00.000Z",
"endOfSchoolYear": "1996-10-29T20:24:00.000Z",
"_id": "63233d50328cc09ec9e6b24c"
}
]
}
}
Response
{
"success": true,
"data_user": {
"email": "[email protected]",
"schoolID": "qwerty",
"role": "admin",
"status": "Active"
},
"data_role": {
"tel": "0917893332"
},
"data_school": {
"schoolName": "qwerty",
"paymentStatus": "pending",
"status": "pending",
"requests": [
],
"clubs": [
],
"schedule": [
],
"adminID": [
]
}
}
Response
{
"success": true,
"data_user": {
"email": "[email protected]",
"schoolID": "qwerty",
"role": "teacher",
"status": "Active"
},
"data_role": {
"firstname": "Champ",
"lastname": "Chaisoro",
"tel": "081111",
"clubs": [
]
},
"data_school": {
"schoolName": "qwerty",
"paymentStatus": "pending",
"status": "pending",
"requests": [
],
"clubs": [
],
"schedule": [
],
"adminID": [
]
}
}
Response
{
"success": true,
"data_user": {
"email": "[email protected]",
"schoolID": "qwerty",
"role": "student",
"status": "Active"
},
"data_role": {
"firstname": "Bird",
"lastname": "tongchai",
"enteredYear": 2021,
"classYear": 3,
"isActive": "Active",
"clubs": [
]
},
"data_school": {
"schoolName": "qwerty",
"paymentStatus": "pending",
"status": "pending",
"requests": [
],
"clubs": [
],
"schedule": [
],
"adminID": [
]
}
}