lib/imperituroard/projects/iot/mongoconnector.rb in imperituroard-0.3.1 vs lib/imperituroard/projects/iot/mongoconnector.rb in imperituroard-0.3.2

- old
+ new

@@ -36,11 +36,11 @@ result = collection.insert_one(doc) out_resp = {:code => 200, :result => "audit_logger: Request completed successfully", :body => result} rescue out_resp = {:code => 507, :result => "audit_logger: Unknown SDK error"} end - internal_func.printer_texter(out_resp) + internal_func.printer_texter(out_resp, "debug") out_resp end #:code => 507, :result => "Unknown SDK error" #{:code => 200, :result => "Request completed successfully", :body => result_ps} @@ -70,11 +70,11 @@ end rescue out_resp = {:code => 507, :result => "get_profiles_by_login: Unknown SDK error"} end - internal_func.printer_texter(out_resp) + internal_func.printer_texter(out_resp, "debug") out_resp end def get_imei_info_from_db(imeilist) out_resp = {} @@ -92,11 +92,11 @@ } out_resp = {:code => 200, :result => "get_imei_info_from_db: Request completed successfully", :body => result_ps} rescue out_resp = {:code => 507, :result => "get_imei_info_from_db: Unknown SDK error"} end - internal_func.printer_texter(out_resp) + internal_func.printer_texter(out_resp, "debug") out_resp end def get_profile_id_by_name(profile_name) begin @@ -160,11 +160,11 @@ out_resp = {:code => 500, :result => "check_login_profile_permiss: Access denied. Login not found"} end else out_resp = {:code => 500, :result => "check_login_profile_permiss: Access denied. Login not found"} end - internal_func.printer_texter(out_resp) + internal_func.printer_texter(out_resp, "debug") out_resp end def check_login_prof_perm_id_one(login, profile_id) @@ -189,11 +189,11 @@ end end else out_resp = {:code => 500, :result => "check_login_prof_perm_id_one: Login not found"} end - internal_func.printer_texter(out_resp) + internal_func.printer_texter(out_resp, "debug") out_resp end def check_imei_exists(imei_list) out_resp = {} @@ -212,11 +212,11 @@ p "not_ex" p not_ex p res_exists out_resp = {:code => 200, :result => "check_imei_exists: Request completed successfully", :body => {:exists => res_exists, :not_exists => not_ex}} - internal_func.printer_texter(out_resp) + internal_func.printer_texter(out_resp, "debug") out_resp end def imei_insert_list(imei_list) @@ -309,11 +309,11 @@ end rescue out_resp = {:code => 507, :result => "get_profile_name_from_imei: Unknown SDK error"} end - internal_func.printer_texter(out_resp) + internal_func.printer_texter(out_resp, "debug") out_resp end def device_remove_single_mongo(imei) @@ -327,11 +327,11 @@ p result out_resp = {:code => 200, :result => "device_remove_single_mongo: Request completed successfully"} rescue out_resp = {:code => 507, :result => "device_remove_single_mongo: Unknown SDK error"} end - internal_func.printer_texter(out_resp) + internal_func.printer_texter(out_resp, "debug") out_resp end def device_modify_attr_mongo(imei, address) out_resp = {} @@ -344,11 +344,11 @@ result = collection.update_one(doc, sett) out_resp = {:code => 200, :result => "device_modify_attr_mongo: Request completed successfully"} rescue out_resp = {:code => 507, :result => "device_modify_attr_mongo: Unknown SDK error"} end - internal_func.printer_texter(out_resp) + internal_func.printer_texter(out_resp, "debug") out_resp end def device_modify_any_attr_mongo(imei, attr_list) out_resp = {} @@ -379,10 +379,10 @@ secret = result_ps[0][:iot_data][:secret] out_resp = {:code => 200, :result => "get_iot_oceanconnect_credent: Request completed successfully", :body => {:app_id => app_id, :secret => secret}} rescue out_resp = {:code => 500, :result => "get_iot_oceanconnect_credent: Process failed"} end - internal_func.printer_texter(out_resp) + internal_func.printer_texter(out_resp, "debug") out_resp end def ttt \ No newline at end of file