Apps/Controller/Api/Content.php 1 location
|
@@ 55-57 (lines=3) @@
|
52 |
|
public function actionChangerate($type, $id) |
53 |
|
{ |
54 |
|
// check input params |
55 |
|
if (!Arr::in($type, ['plus', 'minus']) || !Obj::isLikeInt($id)) { |
56 |
|
throw new JsonException('Bad conditions'); |
57 |
|
} |
58 |
|
|
59 |
|
// get current user and check is authed |
60 |
|
$user = App::$User->identity(); |
Apps/Controller/Api/Profile.php 1 location
|
@@ 331-333 (lines=3) @@
|
328 |
|
// get current user object |
329 |
|
$user = App::$User->identity(); |
330 |
|
|
331 |
|
if (Arr::in($queryType, ['before', 'after']) && (!Obj::isLikeInt($queryId) || $queryId < 1)) { |
332 |
|
throw new JsonException('Bad input data'); |
333 |
|
} |
334 |
|
|
335 |
|
$messages = null; |
336 |
|
// sounds like a Hindi code, but we need more closures to organize where conditions |