Skip to content

Commit

Permalink
Merge pull request #122 from camicroscope/develop
Browse files Browse the repository at this point in the history
For 3.9.6
  • Loading branch information
birm authored Aug 5, 2021
2 parents 91fec6d + 62b5cb6 commit 4853889
Show file tree
Hide file tree
Showing 8 changed files with 5,434 additions and 476 deletions.
3 changes: 3 additions & 0 deletions caracal.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ var HANDLERS = {
"findMarkTypes": function() {
return dataHandlers.Mark.findMarkTypes;
},
"updateMarksLabel": function() {
return dataHandlers.Mark.updateMarksLabel;
},
"heatmapTypes": function() {
return dataHandlers.Heatmap.types;
},
Expand Down
19 changes: 19 additions & 0 deletions handlers/dataHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,26 @@ Mark.findMarkTypes = function(req, res, next) {
}).catch((e) => next(e));
}
};
Mark.updateMarksLabel = function(req, res, next) {
var query = req.query;
delete query.token;
// initial data

var newVals = {
$set: {
'provenance.analysis.name': query.name,
'properties.annotations.name': query.name,
'properties.annotations.notes': query.name,
},
};
mongoDB.update('camic', 'mark',
{
'provenance.analysis.labelId': query.id,
}, newVals).then((x) => {
req.data = x;
next();
}).catch((e) => next(e));
};
var Heatmap = {};
Heatmap.types = function(req, res, next) {
var query = req.query;
Expand Down
Loading

0 comments on commit 4853889

Please sign in to comment.