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
|
@@ 366-368 (lines=3) @@
|
363 |
|
// get current user object |
364 |
|
$user = App::$User->identity(); |
365 |
|
|
366 |
|
if (Arr::in($queryType, ['before', 'after']) && (!Obj::isLikeInt($queryId) || $queryId < 1)) { |
367 |
|
throw new NativeException('Bad input data'); |
368 |
|
} |
369 |
|
|
370 |
|
$messages = null; |
371 |
|
// sounds like a Hindi code, but we need more closures to organize where conditions |