Platform upgrade: login auth fix, OCR/OSS upload, system menus and dicts, weather dashboard, weighing and invoice modules
This commit is contained in:
@@ -37,7 +37,7 @@ public class AuthController(AppDbContext db, JwtService jwt, CurrentUserService
|
||||
public async Task<ActionResult<UserInfoDto>> Me()
|
||||
{
|
||||
var cu = currentUser.Get()!;
|
||||
var user = await db.Users.Include(u => u.Org).FirstAsync(u => u.Id == cu.Id);
|
||||
var user = await db.Users.Include(u => u.Org).Include(u => u.SysRole).FirstAsync(u => u.Id == cu.Id);
|
||||
return Ok(BuildInfo(user));
|
||||
}
|
||||
|
||||
@@ -58,5 +58,5 @@ public class AuthController(AppDbContext db, JwtService jwt, CurrentUserService
|
||||
|
||||
private static UserInfoDto BuildInfo(User user) => new(
|
||||
user.Id, user.Username, user.RealName, user.Phone, user.Role.ToString(),
|
||||
user.OrgId, user.Org?.Name, user.Org?.Type.ToString(), user.IsActive);
|
||||
user.RoleId, user.SysRole?.Name, user.OrgId, user.Org?.Name, user.Org?.Type.ToString(), user.IsActive);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user