Lessons - ita-social-projects/what-front GitHub Wiki
- Get all lessons
url = http://localhost:3000/api/lessons
Response body
[
{
“id”: int,
"themeName": "string",
“mentorId”: int,
"lessonDate": “string (YYYY-MM-DD HH:MM:SS)”}
}
...
]
- Get lesson by student`s id
url = http://localhost:3000/api/lessons/students/id
[
{
"themeName": "string",
"id": int,
"presence": bool (true/false),
"mark": int,
"comment": "string",
"studentGroupId": int,
"lesson_date": “string (YYYY-MM-DD HH:MM:SS)”
}
...
]
- Post lessons
url = http://localhost:3000/api/lessons
in ➡️
Body object
{
"themeName": "string",
"mentorId": int,
"groupId": int,
"lessonVisits": [
{
"studentId": int,
"studentMark": int,
"presence": bool(true/false),
"comment": "string"
},
…],
"lessonDate": “string (YYYY-MM-DD HH:MM:SS)”
}
- Put lesson
url = http://localhost:3000/api/lessons/id
in ➡️
Body object
{
"lessonVisits": [
{
"studentId": int,
"studentMark": int,
"presence": bool (true/false),
"comment": "string"
}
],
"themeName": "string",
"mentorId": int,
"lessonDate": “string (YYYY-MM-DD HH:MM:SS)”
}
- Delete lesson
url = http://localhost:3000/api/lessons/id