Attempting to pass JSON body for deletion through angular JS -- 2

已取消 已发布的 4 年前 货到付款
已取消 货到付款

Attempting to pass JSON body for deletion through angular JS

I've currently got an endpoint that relies on a JSON body in order for deletion to happen. This is the following code:

if ([login to view URL] > 0) {

var deleteRequest = [];

for (var i = 0; i < [login to view URL]; i++) {

var service = {};

[login to view URL] = $[login to view URL][toDeleteService[i]].serviceId;

[login to view URL](service);

}

var deleteUrl = "api/class/" + $scope.targetEntity.serviceId+ "/student";

await asyncDeleteUrl(deleteUrl, deleteRequest);

}

async function asyncDeleteUrl(deleteUrl, toBeDeleted) {

return new Promise(function (resolve, reject) {

$[login to view URL](deleteUrl, toBeDeleted)

.then(function (response) {

resolve(response);

},

function (errorResponse) {

reject(errorResponse);

$[login to view URL]('Bad Modification Interrupted', errorResponse);

});

});

}

I keep getting an error saying the required rest body is missing but I'm not sure why that would be the case. Any help would be appreciated, thank you.

软件构架 视窗桌面

项目ID: #24006801

关于项目

1个方案 远程项目 活跃的4 年前