Apps/Controller/Api/Content.php 1 location
|
@@ 57-59 (lines=3) @@
|
| 54 |
|
public function actionChangerate($type, $id) |
| 55 |
|
{ |
| 56 |
|
// check input params |
| 57 |
|
if (!Arr::in($type, ['plus', 'minus']) || !Obj::isLikeInt($id)) { |
| 58 |
|
throw new NativeException('Bad conditions'); |
| 59 |
|
} |
| 60 |
|
|
| 61 |
|
// get current user and check is authed |
| 62 |
|
$user = App::$User->identity(); |
Apps/Controller/Api/Profile.php 1 location
|
@@ 367-369 (lines=3) @@
|
| 364 |
|
// get current user object |
| 365 |
|
$user = App::$User->identity(); |
| 366 |
|
|
| 367 |
|
if (Arr::in($queryType, ['before', 'after']) && (!Obj::isLikeInt($queryId) || $queryId < 1)) { |
| 368 |
|
throw new NativeException('Bad input data'); |
| 369 |
|
} |
| 370 |
|
|
| 371 |
|
$messages = null; |
| 372 |
|
// sounds like a Hindi code, but we need more closures to organize where conditions |