common 12
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
"@hapi/boom": "^9.1.0",
|
||||
"@ng-bootstrap/ng-bootstrap": "6.2.0",
|
||||
"@types/chart.js": "^2.9.16",
|
||||
"@QMI/qmi-cloud-common": "2.0.11",
|
||||
"@QMI/qmi-cloud-common": "2.0.12",
|
||||
"adal-angular4": "^4.0.12",
|
||||
"angular-bootstrap-md": "9.0.0",
|
||||
"animate.css": "^3.7.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@QMI/qmi-cloud-common",
|
||||
"version": "2.0.11",
|
||||
"version": "2.0.12",
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-ec2": "^3.590.0",
|
||||
"@aws-sdk/client-rds": "^3.590.0",
|
||||
|
||||
@@ -369,9 +369,9 @@ async function sendSharedProvision(provision, shareWithUser) {
|
||||
await _doSend(shareWithUser.upn, `${provision.user.displayName} shared a QMI Cloud provision with you.`, htmlText);
|
||||
}
|
||||
|
||||
async function sendRotateKey(provision, shareWithUser) {
|
||||
async function sendRotateKey(provision, user) {
|
||||
const htmlText = getHtmlRotateKeyProvision( provision, provision._scenarioDoc);
|
||||
await _doSend(shareWithUser.upn, `${provision.user.displayName} shared a QMI Cloud provision with you.`, htmlText);
|
||||
await _doSend(user.upn, `QMI Cloud - NEW Storage Account Access Key`, htmlText);
|
||||
}
|
||||
|
||||
module.exports.sendProvisionSuccess = sendProvisionSuccess;
|
||||
|
||||
@@ -850,9 +850,7 @@ router.post('/:userId/provisions/:id/startvms', passport.ensureAuthenticatedAndI
|
||||
*
|
||||
*/
|
||||
router.post('/:userId/provisions/:id/rotate-sa-key', passport.ensureAuthenticatedAndIsMe, async (req, res, next) => {
|
||||
try {
|
||||
const triggerUser = req.user;
|
||||
|
||||
try {
|
||||
let provision = await db.provision.getById(req.params.id);
|
||||
if (!provision){
|
||||
return res.status(404).json({"msg": "Not found privision with id "+req.params.id});
|
||||
@@ -860,7 +858,7 @@ router.post('/:userId/provisions/:id/rotate-sa-key', passport.ensureAuthenticate
|
||||
|
||||
const result = await cli.rotateStorageAccountKey(provision._id, req.query.keyName);
|
||||
if (result) {
|
||||
sendEmail.sendRotateKey(provision, shareWithUser);
|
||||
sendEmail.sendRotateKey(provision, provision.user);
|
||||
}
|
||||
return res.json(result);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user