用户表增加删除和获取所有的功能
This commit is contained in:
@ -12,6 +12,10 @@ namespace WorkStation.Server.Controllers
|
||||
{
|
||||
private readonly IUserService _service = service;
|
||||
[HttpPost]
|
||||
public Task<ApiResponse> Add(User item) => _service.AddAsync(item);
|
||||
public async Task<ApiResponse> Add(User item) => await _service.AddAsync(item);
|
||||
[HttpDelete]
|
||||
public async Task<ApiResponse> Delete(int id) => await _service.DelateAsync(id);
|
||||
[HttpGet]
|
||||
public async Task<ApiRespon<List<User>>> GetAll() => await _service.GetAllAsync();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user