Skip to content

Commit

Permalink
added version to models for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonSharratt committed Feb 4, 2020
1 parent 1ce5540 commit 76ea853
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions microservices/requestApi/db/model/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,4 +428,6 @@ model.getAll = function(query, limit, page, user, callback){
}
};

model.VERSION = 1;

module.exports = model;
2 changes: 1 addition & 1 deletion microservices/requestApi/routes/routes/requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ var buildDynamic = function(projectConfig, db, notify, util, router){
// Lookup project from user groups
var project = projectConfig.deriveProjectFromUser(req.user);

console.log("SUBMISSION DB", db);
console.log("SUBMISSION DB v", db.Request.VERSION);

db.Request.getAll({_id: requestId}, 1, 1, req.user, function (reqErr, reqRes) {
if (reqErr || !reqRes || reqRes.length == 0) {
Expand Down
2 changes: 2 additions & 0 deletions microservices/requestApi/routes/v2/db/model/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,4 +275,6 @@ model.getAll = function(query, limit, page, user, callback){

};

model.VERSION = 2;

module.exports = model;

0 comments on commit 76ea853

Please sign in to comment.