ClassController

ClassController handle with Class Resource Api. Pass a Class Object Model Class (\Models\ClassModel) to the constructor of parent class (\Controller\BaseController) for it map the basic crud database operations to this Object.

Extends

Methods

inner teacherClasses(req, res) → {json}

TeacherClasses method. Responds to GET /teacher/:teacher_id If Success returns 200 status code and a json with the classes of one specific teacher. If error return 400 status code and a json => { errors } 500 status code only will be returned if the method generates some unexpected error
Parameters:
Name Type Description
req object Express requisition object.
res object Express response object.
Returns:
json - status code 200 and a json with classes_id´s.
To Do:
  • Write comments