Website: add default organization to Premium trial license keys. (#22192)

Closes: #22190

Changes:
- updated `save-questionnaire-progress` to set a default value for the
`organization` value of generated license keys (if a user does not have
an organization set)
This commit is contained in:
Eric 2024-09-17 18:00:58 -05:00 committed by GitHub
parent ddbdce4ab9
commit 1f1bc9c949
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -147,7 +147,7 @@ module.exports = {
let thirtyDaysFromNowAt = Date.now() + (1000 * 60 * 60 * 24 * 30);
let trialLicenseKeyForThisUser = await sails.helpers.createLicenseKey.with({
numberOfHosts: 10,
organization: this.req.me.organization,
organization: this.req.me.organization ? this.req.me.organization : 'Fleet Premium trial',
expiresAt: thirtyDaysFromNowAt,
});
// Save the trial license key to the DB record for this user.