Fixing various things

This commit is contained in:
Owen
2025-10-27 17:52:39 -07:00
parent 15d63ddffa
commit bd5cc790d6
14 changed files with 117 additions and 47 deletions

View File

@@ -286,7 +286,6 @@ export async function createOrgDomain(
// Save NS records to database
for (const nsValue of nsRecords) {
recordsToInsert.push({
id: generateId(15),
domainId,
recordType: "NS",
baseDomain: baseDomain,
@@ -309,7 +308,6 @@ export async function createOrgDomain(
// Save CNAME records to database
for (const cnameRecord of cnameRecords) {
recordsToInsert.push({
id: generateId(15),
domainId,
recordType: "CNAME",
baseDomain: cnameRecord.baseDomain,
@@ -332,7 +330,6 @@ export async function createOrgDomain(
// Save A records to database
for (const aRecord of aRecords) {
recordsToInsert.push({
id: generateId(15),
domainId,
recordType: "A",
baseDomain: aRecord.baseDomain,

View File

@@ -98,15 +98,16 @@ export async function updateOrg(
parsedBody.data.passwordExpiryDays = undefined;
}
const { tier } = await getOrgTierData(orgId);
if (
!isLicensed &&
tier != TierId.STANDARD &&
parsedBody.data.settingsLogRetentionDaysRequest &&
parsedBody.data.settingsLogRetentionDaysRequest > 30
) {
return next(
createHttpError(
HttpCode.FORBIDDEN,
"You are not allowed to set log retention days greater than 30 because you are not subscribed to the Standard tier"
"You are not allowed to set log retention days greater than 30 with your current subscription"
)
);
}