lib/imperituroard/projects/iot/mongoconnector.rb in imperituroard-1.0.3 vs lib/imperituroard/projects/iot/mongoconnector.rb in imperituroard-1.0.4

- old
+ new

@@ -339,10 +339,11 @@ msisdn: "unknown", description: "test imei", note: "second description", profile: 0, type: 0, + device_type: 0, address: "unknown" } result = collection.insert_one(l) p result end @@ -362,10 +363,11 @@ msisdn: "unknown", description: "test imei", note: "second description", profile: 0, type: 0, + device_type: 0, address: "unknown" } result = collection.insert_one(l) p result end @@ -630,10 +632,13 @@ def compare_device_types(type1, type2) out_answ = {} tp1 = internal_func.if_digit_or_string(type1) tp2 = internal_func.if_digit_or_string(type2) + p tp1 + p tp2 + p "tp" if tp1[:body][:string] == tp2[:body][:string] && tp1[:body][:string] == false if type1.to_i == type2.to_i out_answ = {:code => 200, :result => "compare_device_types: types are the same", :is_the_same => true, :data_type => "integer"} else @@ -646,10 +651,11 @@ out_answ = {:code => 200, :result => "compare_device_types: types are different", :is_the_same => false, :data_type => "string"} end else tp1_data = {} tp2_data = {} + p "gggggggg" if tp1[:body][:string] tp1_data = self.get_type_by_name(type1) else tp1_data = self.get_type_by_id(type1.to_i) end @@ -657,9 +663,14 @@ if tp2[:body][:string] tp2_data = self.get_type_by_name(type2) else tp2_data = self.get_type_by_id(type2.to_i) end + + p tp1_data + p tp2_data + p type1 + p type2 if tp1_data["type_id"] == tp2_data["type_id"] out_answ = {:code => 200, :result => "compare_device_types: profiles are the same", :is_the_same => true, :data_type => "different"} else out_answ = {:code => 200, :result => "compare_device_types: profiles are different", :is_the_same => false, :data_type => "different"}