Merge branch 'master' into dev

This commit is contained in:
Фролов 2021-09-20 10:33:45 +05:00
commit ea95563717
2 changed files with 14 additions and 2 deletions

View File

@ -97,9 +97,19 @@ namespace AsbCloudInfrastructure.Services
{
Date = message.Date,
Id = message.Id,
User = users.FirstOrDefault(u => u.IdUser == message.IdTelemetryUser).MakeDisplayName(),
};
if (message.IdTelemetryUser is not null)
{
if (users.Any())
{
var user = users.FirstOrDefault(u => u.IdUser == message.IdTelemetryUser);
messageDto.User = user.MakeDisplayName();
}
else
messageDto.User = message.IdTelemetryUser.ToString();
}
var e = events.FirstOrDefault(e => e.IdEvent == message.IdEvent);
if (e != null)
{

View File

@ -7,7 +7,9 @@
}
},
"ConnectionStrings": {
"DefaultConnection": "Host=localhost;Database=postgres;Username=postgres;Password=q;Persist Security Info=True"
"DefaultConnection": "Host=localhost;Database=postgres;Username=postgres;Password=q;Persist Security Info=True",
"ServerConnection": "Host=192.168.1.70;Database=postgres;Username=postgres;Password=q;Persist Security Info=True",
"LocalConnection": "Host=localhost;Database=postgres;Username=postgres;Password=q;Persist Security Info=True"
},
"AllowedHosts": "*",
"Urls": "http://0.0.0.0:5000"