Nextrek
Diff Revisions 281 vs 323 for /Android/SmartCharging/endPoints/upload_avatar.php
@@ -2,6 +2,12 @@ | |||
2 | 2 | ||
3 | 3 | require_once("UserRepository.php"); | |
4 | 4 | ||
5 | + | if (!array_key_exists("user_id", $_POST) || !array_key_exists("url", $_POST)) { | |
6 | + | $risposta["return"] = 1; | |
7 | + | $risposta["avatar_path"] = ""; | |
8 | + | echo json_encode($risposta); | |
9 | + | die(); | |
10 | + | } | |
5 | 11 | ||
6 | 12 | if(isset($_FILES['avatar_file'])) | |
7 | 13 | { |