feat: update getCourseById endpoint to return single course response type and improve error handling.

This commit is contained in:
JakkrapartXD 2026-01-28 17:08:44 +07:00
parent b303c50865
commit 07ab43a785
2 changed files with 10 additions and 6 deletions

View file

@ -61,7 +61,7 @@ export class CoursesService {
if (!course) {
return {
code: 200,
message: 'Course fetched successfully',
message: 'no Course fetched successfully',
data: null,
};
}
@ -75,7 +75,6 @@ export class CoursesService {
logger.warn(`Failed to generate presigned URL for thumbnail: ${err}`);
}
}
return {
code: 200,
message: 'Course fetched successfully',