20 lines
614 B
C#
20 lines
614 B
C#
using System.Net.Http.Json;
|
|
|
|
namespace FileService.Application.UploadFile
|
|
{
|
|
public interface IGroupAccessService
|
|
{
|
|
Task<bool> CheckMemberAsync(Guid userId, Guid groupId);
|
|
}
|
|
|
|
public class GroupAccessService(HttpClient httpClient) : IGroupAccessService
|
|
{
|
|
public async Task<bool> CheckMemberAsync(Guid userId, Guid groupId)
|
|
{
|
|
var result = await httpClient.GetFromJsonAsync<IM.Commons.Result<bool>>(
|
|
$"api/groupmember/checkmember?userId={userId}&groupId={groupId}");
|
|
return result?.Succeeded == true && result.Data;
|
|
}
|
|
}
|
|
}
|