mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Теперь при передаче запроса как json, закодированный в теле, он автоматически парсится
This commit is contained in:
@ -86,10 +86,7 @@ class ApiController extends Controller {
|
||||
public function actionUuidsByUsernames() {
|
||||
$usernames = Yii::$app->request->post();
|
||||
if (empty($usernames)) {
|
||||
$usernames = json_decode(Yii::$app->request->getRawBody());
|
||||
if (empty($usernames)) {
|
||||
return $this->illegalArgumentResponse('Passed array of profile names is an invalid JSON string.');
|
||||
}
|
||||
return $this->illegalArgumentResponse('Passed array of profile names is an invalid JSON string.');
|
||||
}
|
||||
|
||||
$usernames = array_unique($usernames);
|
||||
|
Reference in New Issue
Block a user