finish initial implementing application configuration editing through webfront

todo: server configuration
This commit is contained in:
RaidMax
2019-04-12 22:25:18 -05:00
parent f0fd4c66e9
commit b9c4a1b5f6
9 changed files with 64 additions and 168 deletions

View File

@ -171,6 +171,12 @@ namespace SharedLibraryCore.Services
// the alias is the same so we can just remove it
if (oldAlias.AliasId != existingExactAlias.AliasId && oldAlias.AliasId > 0)
{
await context.Clients
.Where(_client => _client.CurrentAliasId == oldAlias.AliasId)
.ForEachAsync(_client => _client.CurrentAliasId = existingExactAlias.AliasId);
await context.SaveChangesAsync();
entity.CurrentServer.Logger.WriteDebug($"[updatealias] {entity} has exact alias match, so we're going to try to remove aliasId {oldAlias.AliasId} with linkId {oldAlias.AliasId}");
context.Aliases.Remove(oldAlias);
await context.SaveChangesAsync();