Nextrek
Diff Revisions
536
vs
537
for /Android/SmartCharging/endPoints/nightly/get_immagini.php
|
@@ -32,10 +32,12 @@ |
32 |
32 |
|
} else if ($type=="comment") { |
33 |
33 |
|
$repo = new CommentRepository($conn); |
34 |
34 |
|
} else { |
35 |
|
- |
$risposta["type"] = "error"; |
|
35 |
+ |
/*$risposta["type"] = "error"; |
36 |
36 |
|
$risposta["id"] = -1; |
37 |
37 |
|
$risposta["imgs"] = null; |
38 |
|
- |
$risposta["return"] = 1; |
|
38 |
+ |
$risposta["return"] = 1;*/ |
|
39 |
+ |
$risposta = createErrorMessage(1, "Parametro \"type\" non valido"); |
|
40 |
+ |
$risposta["type"] = "error"; |
39 |
41 |
|
} |
40 |
42 |
|
|
41 |
43 |
|
$object = $repo->getImages($params["id"]); |
|
@@ -49,7 +51,8 @@ |
49 |
51 |
|
catch(PDOException $e) |
50 |
52 |
|
{ |
51 |
53 |
|
echo $e->getMessage(); |
52 |
|
- |
$risposta["return"] = 1; |
|
54 |
+ |
$risposta = createErrorMessage(1, "Errore DB"); |
|
55 |
+ |
//$risposta["return"] = 1; |
53 |
56 |
|
} |
54 |
57 |
|
|
55 |
58 |
|
echo json_encode($risposta); |