refactor user deletion
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
using Oqtane.Models;
|
||||
using Oqtane.Models;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Oqtane.Services
|
||||
@ -13,7 +13,7 @@ namespace Oqtane.Services
|
||||
|
||||
Task<User> UpdateUserAsync(User user);
|
||||
|
||||
Task DeleteUserAsync(int userId);
|
||||
Task DeleteUserAsync(int userId, int siteId);
|
||||
|
||||
Task<User> LoginUserAsync(User user, bool setCookie, bool isPersistent);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
using Oqtane.Shared;
|
||||
using Oqtane.Shared;
|
||||
using Oqtane.Models;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
@ -36,9 +36,9 @@ namespace Oqtane.Services
|
||||
return await PutJsonAsync<User>($"{Apiurl}/{user.UserId}", user);
|
||||
}
|
||||
|
||||
public async Task DeleteUserAsync(int userId)
|
||||
public async Task DeleteUserAsync(int userId, int siteId)
|
||||
{
|
||||
await DeleteAsync($"{Apiurl}/{userId}");
|
||||
await DeleteAsync($"{Apiurl}/{userId}?siteid={siteId}");
|
||||
}
|
||||
|
||||
public async Task<User> LoginUserAsync(User user, bool setCookie, bool isPersistent)
|
||||
|
Reference in New Issue
Block a user