def post(self): the_post = Post() self.set_format(the_post.get_format(self)) user_id = the_post.get_user_id(self) apply_id = the_post.get_apply_id(self) identity_id = the_post.get_device_identity_id(self) rssi = the_post.get_device_rssi(self) distance = the_post.get_device_distance(self) base_url = the_post.get_base_url(self) instance = LogicBluetoothPosition() result = instance.bluetooth_position(user_id, identity_id, rssi, distance, apply_id, base_url) return self.response(result)
def post(self): the_post = Post() name = the_post.get_name(self) user_id = the_post.get_user_id(self) rssi = the_post.get_device_rssi(self) identity_id = the_post.get_device_identity_id(self) data = dict() data["name"] = name data["user_id"] = user_id data["rssi"] = rssi data["identity_id"] = identity_id db = DBTestDevice() if user_id: db.add(data) result = Result.result_success() self.write(OHHOOperation.dict2json(result))