feat: Add new file with introductory console logs.
This commit is contained in:
parent
e162e24cf8
commit
1cbaed72cb
1 changed files with 38 additions and 0 deletions
|
|
@ -74,6 +74,44 @@
|
|||
| `useCategory.ts` | **Category Management:** ดึงหมวดหมู่สำหรับ Filter |
|
||||
| `useFormValidation.ts` | Helper สำหรับตรวจสอบความถูกต้องของฟอร์ม (RegEx validations) |
|
||||
|
||||
### 2.4 API Integration Points (Verified Endpoints)
|
||||
|
||||
รายการ API ที่มีการเชื่อมต่อและตรวจสอบแล้วว่าใช้งานได้จริง:
|
||||
|
||||
#### **User (`useAuth.ts`)**
|
||||
|
||||
| Endpoint | Method | Function Name | Description |
|
||||
| :-------------------------- | :----- | :------------------ | :----------------------------------- |
|
||||
| `/api/user/me` | GET | `fetchUserProfile` | ดึงข้อมูลโปรไฟล์ผู้ใช้ปัจจุบัน |
|
||||
| `/api/user/me` | PUT | `updateUserProfile` | อัปเดตข้อมูลส่วนตัว (ชื่อ, เบอร์โทร) |
|
||||
| `/api/user/change-password` | POST | `changePassword` | เปลี่ยนรหัสผ่าน |
|
||||
|
||||
#### **CoursesStudent (`useCourse.ts`)**
|
||||
|
||||
| Endpoint | Method | Function Name | Description |
|
||||
| :----------------------------------------------------------------- | :----- | :------------------------ | :------------------------------------------ |
|
||||
| `/api/students/courses/{courseId}/enroll` | POST | `enrollCourse` | ลงทะเบียนเรียนคอร์ส |
|
||||
| `/api/students/courses` | GET | `fetchEnrolledCourses` | ดึงรายชื่อคอร์สที่ลงทะเบียนแล้ว (My Course) |
|
||||
| `/api/students/courses/{courseId}/learn` | GET | `fetchCourseLearningInfo` | ดึงโครงสร้างบทเรียนสำหรับการเรียน |
|
||||
| `/api/students/courses/{courseId}/lessons/{lessonId}` | GET | `fetchLessonContent` | ดึงเนื้อหาบทเรียน (วิดีโอ) |
|
||||
| `/api/students/courses/{courseId}/lessons/{lessonId}/access-check` | GET | `checkLessonAccess` | ตรวจสอบสิทธิ์การเข้าเรียน |
|
||||
| `/api/students/lessons/{lessonId}/progress` | POST | `saveVideoProgress` | บันทึกเวลาที่ดูวิดีโอ (Progress) |
|
||||
| `/api/students/lessons/{lessonId}/progress` | GET | `fetchVideoProgress` | ดึงเวลาที่ดูวิดีโอล่าสุด |
|
||||
| `/api/students/courses/{courseId}/lessons/{lessonId}/complete` | POST | `markLessonComplete` | มาร์คว่าเรียนจบบทเรียนแล้ว |
|
||||
|
||||
#### **Courses (`useCourse.ts`)**
|
||||
|
||||
| Endpoint | Method | Function Name | Description |
|
||||
| :------------------ | :----- | :---------------- | :-------------------------------------- |
|
||||
| `/api/courses` | GET | `fetchCourses` | ดึงรายชื่อคอร์สทั้งหมด (Public Catalog) |
|
||||
| `/api/courses/{id}` | GET | `fetchCourseById` | ดึงรายละเอียดคอร์ส (Public) |
|
||||
|
||||
#### **Categories (`useCategory.ts`)**
|
||||
|
||||
| Endpoint | Method | Function Name | Description |
|
||||
| :---------------- | :----- | :---------------- | :----------------- |
|
||||
| `/api/categories` | GET | `fetchCategories` | ดึงหมวดหมู่ทั้งหมด |
|
||||
|
||||
---
|
||||
|
||||
## 🔐 3. Security & Core Systems
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue