1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-31 18:27:49 +01:00

map plantype to old strings for license hash (#882)

This commit is contained in:
Kyle Spearrin 2020-08-21 17:44:45 -04:00 committed by GitHub
parent e41aca81de
commit 66e67d2172
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -442,6 +442,21 @@ namespace Bit.Core.Utilities
return val.ToString().ToLowerInvariant();
}
if (val is PlanType planType)
{
return planType switch
{
PlanType.Free => "Free",
PlanType.FamiliesAnnually2019 => "FamiliesAnnually",
PlanType.TeamsMonthly2019 => "TeamsMonthly",
PlanType.TeamsAnnually2019 => "TeamsAnnually",
PlanType.EnterpriseMonthly2019 => "EnterpriseMonthly",
PlanType.EnterpriseAnnually2019 => "EnterpriseAnnually",
PlanType.Custom => "Custom",
_ => ((byte)planType).ToString(),
};
}
return val.ToString();
}