Adapt RequestLogUserDto for frontend usage

This commit is contained in:
Фролов 2021-12-17 16:24:54 +05:00
parent 852e13f140
commit 5d45eb7289
2 changed files with 7 additions and 9 deletions

View File

@ -1,19 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AsbCloudApp.Data
{
public class RequestLogUserDto
{
public int Id { get; set; }
public int UserId { get; set; }
public string Login { get; set; }
public string Ip { get; set; }
public long ElapsedMs { get; set; }
public DateTime LastDate { get; set; }
public long Requests { get; set; }
public long Errors { get; set; }
public UserDto User { get; set; }
}
}

View File

@ -109,9 +109,10 @@ namespace AsbCloudInfrastructure.Services
if (!users.ContainsKey(key))
users[key] = new RequestLogUserDto
{
Id = requestLog.UserId,
UserId = requestLog.UserId,
Ip = requestLog.UserIp,
Login = requestLog.UserLogin,
//User = userService.Get(requestLog.UserId),
};
users[key].ElapsedMs += requestLog.ElapsedMilliseconds;
users[key].LastDate = requestLog.Date;