Skip to content

Commit

Permalink
update Reference.delete usage based on ermrestjs change
Browse files Browse the repository at this point in the history
  • Loading branch information
RFSH committed Apr 14, 2023
1 parent 1f4c632 commit 8bb80c7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions common/ellipsis.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@
}, function onSuccess(res) {
scope.$root.showSpinner = true;
// user accepted prompt to delete
reference.delete(logObj).then(function deleteSuccess() {
reference.delete(null, logObj).then(function deleteSuccess() {
scope.$root.showSpinner = false;
// tell parent controller data updated
scope.$emit('record-deleted', emmitedMessageArgs);
}).catch(onError);
}, onError, false);
} else {
scope.$root.showSpinner = true;
reference.delete(logObj).then(function deleteSuccess() {
reference.delete(null, logObj).then(function deleteSuccess() {
scope.$root.showSpinner = false;
// tell parent controller data updated
scope.$emit('record-deleted', emmitedMessageArgs);
Expand Down
2 changes: 1 addition & 1 deletion record/record.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
action: logService.getActionString(logService.logActions.DELETE),
stack: logService.getStackObject()
};
$rootScope.reference.delete(logObj).then(function deleteSuccess() {
$rootScope.reference.delete(null, logObj).then(function deleteSuccess() {
// Get an appLink from a reference to the table that the existing reference came from
var unfilteredRefAppLink = $rootScope.reference.table.reference.contextualize.compact.appLink;
$rootScope.showSpinner = false;
Expand Down
4 changes: 2 additions & 2 deletions viewer/annotations/annotations.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
angular.module('chaise.viewer')

.factory('AnnotationsService', [
'$window', '$q', '$rootScope', 'logService',
'$window', '$q', '$rootScope', 'logService',
function($window, $q, $rootScope, logService) {
var origin = $window.location.origin;
var iframe = $window.frames[0];
Expand Down Expand Up @@ -92,7 +92,7 @@
action: getAnnotationLogAction(logService.logActions.DELETE, item),
stack: getAnnotationLogStack(item)
};
item.tuple.reference.delete(logObj).then(function () {
item.tuple.reference.delete(null, logObj).then(function () {
defer.resolve();
}).catch(function (err) {
defer.reject(err);
Expand Down

0 comments on commit 8bb80c7

Please sign in to comment.