fix issue by self test

This commit is contained in:
jason.wang 2024-10-20 13:02:13 +08:00
parent 0623f3dbef
commit a16b1e4358
2 changed files with 3 additions and 2 deletions

View file

@ -80,5 +80,5 @@ public class UserIdentity : IUserIdentity
public string? Type => _claims?.FirstOrDefault(x => x.Type == "type")?.Value;
[JsonPropertyName("role")]
public string? Role => _claims?.FirstOrDefault(x => x.Type == "role")?.Value;
public string? Role => _claims?.FirstOrDefault(x => x.Type == ClaimTypes.Role)?.Value;
}

View file

@ -22,7 +22,7 @@ public class UserDocument : MongoBase
public string? EmployeeId { get; set; }
public bool IsDisabled { get; set; }
public DateTime CreatedTime { get; set; }
public DateTime UpdatedTime { get; set; }
public DateTime UpdatedTime { get; set; }
public User ToUser()
{
@ -41,6 +41,7 @@ public class UserDocument : MongoBase
Type = Type,
Role = Role,
AffiliateId = AffiliateId,
EmployeeId = EmployeeId,
IsDisabled = IsDisabled,
VerificationCode = VerificationCode,
Verified = Verified,