diff --git a/server/controllers/staff/add.php b/server/controllers/staff/add.php index 649f9cec..035a0167 100644 --- a/server/controllers/staff/add.php +++ b/server/controllers/staff/add.php @@ -2,6 +2,35 @@ use Respect\Validation\Validator as DataValidator; DataValidator::with('CustomValidations', true); +/** + * @api {post} /staff/add Add a new staff member. + * + * @apiName Add + * + * @apiGroup staff + * + * @apiDescription This path add a new staff member. + * + * @apiPermission Staff level 3 + * + * @apiParam {String} name The name of the new staff member. + * + * @apiParam {String} email The email of the new staff member. + * + * @apiParam {String} password The password of the new staff member. + * + * @apiParam {number} level The level of the new staff member. + * + * @apiParam {string} profilePic The profile pic of the new staff member. + * + * @apiParam {string} departments The departments that will have assigned the new staff member. + * + * @apiError {String} message + * + * @apiSuccess {Object} data + * + */ + class AddStaffController extends Controller { const PATH = '/add'; const METHOD = 'POST'; diff --git a/server/controllers/staff/assign-ticket.php b/server/controllers/staff/assign-ticket.php index 4f40d524..d106ae4f 100644 --- a/server/controllers/staff/assign-ticket.php +++ b/server/controllers/staff/assign-ticket.php @@ -2,6 +2,25 @@ use Respect\Validation\Validator as DataValidator; DataValidator::with('CustomValidations', true); +/** + * @api {post} /staff/assign-ticket Assign a ticket to a staff member. + * + * @apiName Assign ticket + * + * @apiGroup staff + * + * @apiDescription This path assigns a ticket to a staff member. + * + * @apiPermission Staff level 1 + * + * @apiParam {number} ticketNumber The number of the ticket to assign. + * + * @apiError {string} message + * + * @apiSuccess {Object} data + * + */ + class AssignStaffController extends Controller { const PATH = '/assign-ticket'; const METHOD = 'POST'; diff --git a/server/controllers/staff/delete.php b/server/controllers/staff/delete.php index 47cb461a..b51cd3b7 100644 --- a/server/controllers/staff/delete.php +++ b/server/controllers/staff/delete.php @@ -2,6 +2,25 @@ use Respect\Validation\Validator as DataValidator; use RedBeanPHP\Facade as RedBean; +/** + * @api {post} /staff/delete Delete a staff member. + * + * @apiName Delete + * + * @apiGroup staff + * + * @apiDescription This path deletes a staff member. + * + * @apiPermission Staff level 3 + * + * @apiParam {number} staffId The id of the staff member. + * + * @apiError {String} message + * + * @apiSuccess {Object} data + * + */ + DataValidator::with('CustomValidations', true); class DeleteStaffController extends Controller { diff --git a/server/controllers/staff/edit.php b/server/controllers/staff/edit.php index eaf8839a..44897e1a 100644 --- a/server/controllers/staff/edit.php +++ b/server/controllers/staff/edit.php @@ -1,6 +1,33 @@