Commit ce31992f authored by Mahdi Sellami's avatar Mahdi Sellami

generated mongoDB id value to verfahrensId

parent 538fd66a
......@@ -9,7 +9,12 @@ const Application = require('../models/application');
**/
exports.postCaseApplication = function(body) {
return new Promise(function(resolve, reject) {
const applicationRecord = Application.create(body);
// TODO maybe remove VerfahrensId later (discuss with Peter)
var applicationRecord = Application.create(body).then(function(doc) {
doc.verfahrensId = doc.id
doc.save()
return doc
});
resolve(applicationRecord);
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment