feat: update getCourseById endpoint to return single course response type and improve error handling.
This commit is contained in:
parent
b303c50865
commit
07ab43a785
2 changed files with 10 additions and 6 deletions
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue