Mô tả: Lấy toàn bộ danh sách khóa học trong hệ thống
Endpoint: GET /course
Headers:
{
"Accept-Language": "vi" // hoặc "en"
}
Query Parameters: Không có
Ví dụ Request:
GET /api/course
Accept-Language: vi
Response thành công (200):
[
{
"id": 1,
"code": "CS101",
"name": "Lập trình cơ bản",
"description": "Khóa học giới thiệu về lập trình",
"credits": 3,
"faculty": 1,
"isActive": true,
"createdAt": "2024-01-15T08:30:00Z",
"updatedAt": "2024-01-15T08:30:00Z"
},
{
"id": 2,
"code": "MATH201",
"name": "Toán cao cấp",
"description": "Khóa học toán học nâng cao",
"credits": 4,
"faculty": 2,
"isActive": true,
"createdAt": "2024-01-16T09:00:00Z",
"updatedAt": "2024-01-16T09:00:00Z"
}
]
Response lỗi (500):
{
"error": "Lỗi khi lấy danh sách khoa"
}
Mô tả: Tạo một khóa học mới trong hệ thống
Endpoint: POST /course
Headers: