fix course init

main
Kushal Dotel 6 months ago
parent 8c46f2a61a
commit 187754261f
  1. 2
      backend/blueprints/course/__init__.py
  2. BIN
      backend/uploads/learn-with-us.jpg

@ -224,7 +224,7 @@ def course_info(course_uuid):
# Only allow owner or admin to query info for course that is not published or is pending
if not selected_course.isActive or selected_course.publishedStatus != int(PublishedStatus.APPROVED):
if g.get("is_authed"):
if g.current_user.role == int(UserRole.ADMIN) or g.current_user.id == selected_course.authorID
if g.current_user.role == int(UserRole.ADMIN) or g.current_user.id == selected_course.authorID:
pass
else:
return jsonify({'message': 'The course does not exist.'}), 404

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 KiB

Loading…
Cancel
Save