Skip to content

Commit 606340c

Browse files
authored
fix
1 parent c1b38c4 commit 606340c

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

core/api/mobile.api.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,17 +175,22 @@
175175
}
176176

177177
if ($jsonrpc->getMethod() == 'geolocSave'){
178-
log::add('mobile', 'debug', 'Geoloc ADD '. $params['id'] .' > ' . $params['name']);
179-
mobile::SaveGeoloc($params);
180-
$jsonrpc->makeSuccess();
178+
log::add('mobile', 'debug', 'Geoloc SAVE '. $params['id'] .' > ' . $params['name']);
179+
if($params['id'] != '' || $params['id'] != null){
180+
mobile::SaveGeoloc($params);
181+
$jsonrpc->makeSuccess();
182+
}else{
183+
throw new Exception(__('pas d\'id : ', __FILE__) . $params['name']);
184+
}
181185
}
182186

183187
if ($jsonrpc->getMethod() == 'geolocDel'){
184188
log::add('mobile', 'debug', 'Geoloc DEL '. $params['id'] .' > ' . $params['name']);
185-
mobile::DelGeoloc($params);
189+
mobile::delGeoloc($params);
186190
$jsonrpc->makeSuccess();
187191
}
188192

189193

190194
throw new Exception(__('Aucune demande', __FILE__));
191195
?>
196+

0 commit comments

Comments
 (0)