added access control to sensorpoint

pull/89/head
Caozhenhui 2021-12-03 16:42:18 +08:00
parent 2eaa8df6c6
commit 0edaf58aee
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
app.factory('SensorPointService', function($http) {
return {
addPair: function(sensorID,pointID, headers, callback) {
$http.post(getAPI()+'sensors/'+sensorID+'/points',{data:{'point_id':pointID}})
$http.post(getAPI()+'sensors/'+sensorID+'/points',{data:{'point_id':pointID}}, {headers})
.then(function (response) {
callback(response);
}, function (response) {
@ -11,7 +11,7 @@ app.factory('SensorPointService', function($http) {
},
deletePair: function(sensorID,pointID, headers, callback) {
$http.delete(getAPI()+'sensors/'+sensorID+'/points/'+pointID)
$http.delete(getAPI()+'sensors/'+sensorID+'/points/'+pointID, {headers})
.then(function (response) {
callback(response);
}, function (response) {