Skip to content

Commit

Permalink
MSCO-21: create vmbox when creating user (#51)
Browse files Browse the repository at this point in the history
* MSCO-21: create vmbox when creating user

* handle vmbox owner id on createVMBox
  • Loading branch information
mavriciomart authored Jun 3, 2022
1 parent 2a76a20 commit ccad7eb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,22 @@ define(function(require) {
}
);
},
function(_data, waterfallCallback) {
data.vmbox.owner_id = data.user.id;

self.createVMBox(data.vmbox,
function(vmdata) {
resultData.vmbox = vmdata;
data.callflow.flow.children._.data.id = vmdata.id;
waterfallCallback(null, vmdata);
},
function(parsedError) {
parsedError.data.mailbox.unique.cause = data.vmbox.mailbox;
resultData.err = parsedError;
waterfallCallback(true, parsedError);
}
);
},
function(_data, waterfallCallback) {
data.callflow.owner_id = data.user.id;
data.callflow.type = 'mainUserCallflow';
Expand Down

0 comments on commit ccad7eb

Please sign in to comment.