fix: 修改无法获得服务器全部用户的问题
This commit is contained in:
parent
d9fec8e595
commit
da95083ebb
@ -40,6 +40,13 @@ public class AdminController(
|
|||||||
return user.Admin;
|
return user.Admin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpGet("user/list")]
|
||||||
|
public async Task<ActionResult<List<AppUser>>> GetUsersAsync()
|
||||||
|
{
|
||||||
|
var users = await userManager.Users.ToListAsync();
|
||||||
|
return users;
|
||||||
|
}
|
||||||
|
|
||||||
[HttpPost("user/delete/{username}")]
|
[HttpPost("user/delete/{username}")]
|
||||||
public async Task<IActionResult> DeleteUserAsync(string username)
|
public async Task<IActionResult> DeleteUserAsync(string username)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user