include SiteId in SyncEvent

This commit is contained in:
sbwalker
2024-02-26 14:48:26 -05:00
parent aac4d3eefb
commit 2ed593c5e0
23 changed files with 100 additions and 84 deletions

View File

@ -77,7 +77,7 @@ namespace Oqtane.Controllers
if (ModelState.IsValid && profile.SiteId == _alias.SiteId)
{
profile = _profiles.AddProfile(profile);
_syncManager.AddSyncEvent(_alias.TenantId, EntityNames.Profile, profile.ProfileId, SyncEventActions.Create);
_syncManager.AddSyncEvent(_alias, EntityNames.Profile, profile.ProfileId, SyncEventActions.Create);
_logger.Log(LogLevel.Information, this, LogFunction.Create, "Profile Added {Profile}", profile);
}
else
@ -97,7 +97,7 @@ namespace Oqtane.Controllers
if (ModelState.IsValid && profile.SiteId == _alias.SiteId && profile.ProfileId == id && _profiles.GetProfile(profile.ProfileId, false) != null)
{
profile = _profiles.UpdateProfile(profile);
_syncManager.AddSyncEvent(_alias.TenantId, EntityNames.Profile, profile.ProfileId, SyncEventActions.Update);
_syncManager.AddSyncEvent(_alias, EntityNames.Profile, profile.ProfileId, SyncEventActions.Update);
_logger.Log(LogLevel.Information, this, LogFunction.Update, "Profile Updated {Profile}", profile);
}
else
@ -118,7 +118,7 @@ namespace Oqtane.Controllers
if (profile != null && profile.SiteId == _alias.SiteId)
{
_profiles.DeleteProfile(id);
_syncManager.AddSyncEvent(_alias.TenantId, EntityNames.Profile, profile.ProfileId, SyncEventActions.Delete);
_syncManager.AddSyncEvent(_alias, EntityNames.Profile, profile.ProfileId, SyncEventActions.Delete);
_logger.Log(LogLevel.Information, this, LogFunction.Delete, "Profile Deleted {ProfileId}", id);
}
else