From 82de29254bae51ab8d20778fdc9cb2f307012185 Mon Sep 17 00:00:00 2001 From: Artem Konenko <yadummer@gmail.com> Date: Mon, 14 Nov 2016 15:34:07 +0300 Subject: [PATCH] #198 Add degree to auth/userinfo --- ~dev_rating/application/classes/Controller/Api/V0/Auth.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/~dev_rating/application/classes/Controller/Api/V0/Auth.php b/~dev_rating/application/classes/Controller/Api/V0/Auth.php index bd36014e2..7e3715eee 100644 --- a/~dev_rating/application/classes/Controller/Api/V0/Auth.php +++ b/~dev_rating/application/classes/Controller/Api/V0/Auth.php @@ -6,7 +6,7 @@ class Controller_Api_V0_Auth extends Controller_Handler_Api * @api {get} api/v0/auth/userinfo?token=:token&login=:login&password=:password Check authorisation and get user info * @apiName Get user info * @apiGroup Auth - * @apiVersion 0.1.1 + * @apiVersion 0.1.2 * @apiParam {String} token Api key * @apiParam {String} login User's login * @apiParam {String} password User's password @@ -22,6 +22,7 @@ class Controller_Api_V0_Auth extends Controller_Handler_Api * @apiSuccess (200) {String} GradeID If user is a student * @apiSuccess (200) {String} Group If user is a student * @apiSuccess (200) {String} GroupID If user is a student + * @apiSuccess (200) {String} Degree If user is a student */ public function action_get_userinfo() { if ( !$this->user->isAdmin() ) // ToDo: we should use apikey mask for checking rights @@ -54,6 +55,7 @@ class Controller_Api_V0_Auth extends Controller_Handler_Api $res->GradeID = $student->GradeID; $res->Group = $student->GroupNum; $res->GroupID = $student->GroupID; + $res->Degree = $student->Degree; break; } -- GitLab