| Total Complexity | 3 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class User extends ApiController |
||
| 14 | { |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Check user auth. |
||
| 18 | * @return string |
||
| 19 | * @throws JsonException |
||
| 20 | */ |
||
| 21 | public function actionAuth() |
||
| 22 | { |
||
| 23 | $this->setJsonHeader(); |
||
| 24 | if (!App::$User->isAuth()) { |
||
| 25 | throw new JsonException('No auth'); |
||
| 26 | } |
||
| 27 | |||
| 28 | return json_encode([ |
||
| 29 | 'status' => 1, |
||
| 30 | 'data' => 'Auth done' |
||
| 31 | ]); |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Hybridauth endpoint. |
||
| 36 | */ |
||
| 37 | public function actionEndpoint() |
||
| 40 | } |
||
| 41 | } |
||
| 42 |