From 713021359e1c3aa2d49d916357a9a071462c7d93 Mon Sep 17 00:00:00 2001 From: sbwalker Date: Mon, 18 Dec 2023 15:07:07 -0500 Subject: [PATCH] add additional SetAlias overload --- Oqtane.Server/Infrastructure/Interfaces/ITenantManager.cs | 1 + Oqtane.Server/Infrastructure/TenantManager.cs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/Oqtane.Server/Infrastructure/Interfaces/ITenantManager.cs b/Oqtane.Server/Infrastructure/Interfaces/ITenantManager.cs index b1a4892b..c4388714 100644 --- a/Oqtane.Server/Infrastructure/Interfaces/ITenantManager.cs +++ b/Oqtane.Server/Infrastructure/Interfaces/ITenantManager.cs @@ -7,6 +7,7 @@ namespace Oqtane.Infrastructure Alias GetAlias(); Tenant GetTenant(); void SetAlias(Alias alias); + void SetAlias(int tenantId, int siteId); void SetTenant(int tenantId); } } diff --git a/Oqtane.Server/Infrastructure/TenantManager.cs b/Oqtane.Server/Infrastructure/TenantManager.cs index 7134e135..96af4e05 100644 --- a/Oqtane.Server/Infrastructure/TenantManager.cs +++ b/Oqtane.Server/Infrastructure/TenantManager.cs @@ -83,6 +83,11 @@ namespace Oqtane.Infrastructure // background processes can set the alias using the SiteState service _siteState.Alias = alias; } + public void SetAlias(int tenantId, int siteId) + { + // background processes can set the alias using the SiteState service + _siteState.Alias = new Alias { TenantId = tenantId, AliasId = -1, SiteId = siteId }; + } public void SetTenant(int tenantId) {