为什么422(不可处理的实体)显示?

时间:2016-04-21 07:59:17

标签: angularjs ionic-framework

我在角度js中使用delete方法,

控制器

$scope.delete = function(object) {
     $scope.deleteobject = {"id":object.id}
     authService.deletedetails($scope.deleteobject).success(function(data, status) {
         console.log("succesfully deleted");
     }).error(function(data, status) {
         console.log("data:",data);
         console.log("status",status);
     });
}

服务

service.deletedetails = function(user) {
  return $http.delete('/api/delete', user);

}

一切正确,但仍然显示errordeleterest api应用中工作。

面临错误: -

DELETE localhost:8100/api/delete 422 (Unprocessable Entity) Entryview.js:44 data: Object {Message: "Not Deleted"} Entryview.js:45 status 422 Entryview.js:47 config Object {method: "DELETE", transformRequest: Array[1], transformResponse: Array[1], id: 23, url: "/api/delete"…} –

0 个答案:

没有答案