我的问题是我的表没有为我的字段“ Distribuidora”更新,但是其余字段的更新却完美无缺。这是我的代码,也许我在数据库中失败了,但是我尝试了所有我的Mongodb分销商代码是: takingstats.find({ distributor: distributorAux }, { projection: { _id: 0 } }).sort({ rank: -1 }).toArray((err, takingArray) => { if(takingArray.length>=1){ return res.send(takingArray); }if(takingArray.lenght==1){ return res.send(takingArray[0]); }else{ return res.sendStatus(404); } });我的JS / Angular代码: $scope.busqueda = function() { $http.get(API + "?" + $scope.valor + "=" + $scope.valor2).then(function(response) { if(response.data.length>1){ $scope.takingstats = response.data; console.log("Data received: " + JSON.stringify(response.data, null, 2)); }else{ $scope.takingstats = [response.data]; console.log("Data received: " + JSON.stringify(response.data, null, 2)); } }).catch(function(response) { if (response.status == 404) { alert("Película no encontradas para dichos " + $scope.valor); }; $scope.estado = response.status; });; };返回数据,但表不会更新该数据
添加回答
举报
0/150
提交
取消
