This commit is contained in:
dev-chiefworks
2022-04-20 21:16:07 -04:00
parent ceb4532bad
commit fa418f5ba7
2 changed files with 14 additions and 5 deletions
+2 -1
View File
@@ -32,7 +32,8 @@ public static function NodeServiceApi($url_path, $data_json){
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
// echo 'Error:' . curl_error($ch);
log_message('critical', "NodeServiceApi=>curl_error".curl_error($ch) );
}
curl_close($ch);
+12 -4
View File
@@ -24,13 +24,21 @@ CRITICAL - 2022-04-20 19:46:44 --> reset_key=>
$res =[];
switch($data['mode']){
case 100:
case 100:
$arr = array('mode' => '100', 'email' => $data['email'] );
$data_json = json_encode($arr);
//$data_json = "{\"email\":\"$data['email']\",\"mode\":100}";
$res = self::NodeServiceApi('/user/reset-password', $data_json);
break;
break;
case 200:
$arr = array('mode' => '100', 'email' => $data['email'], 'resetPin'=>1001 );
$data_json = json_encode($arr);
$res = self::NodeServiceApi('/user/reset-password', $data_json);
break;
case 300:
break;
}
return $res;