...
This commit is contained in:
@@ -35,7 +35,7 @@ namespace HushianWebApp.Service
|
||||
if (_Http.DefaultRequestHeaders.Any(t => t.Key == "Authorization"))
|
||||
_Http.DefaultRequestHeaders.Remove("Authorization");
|
||||
}
|
||||
public async Task<HttpResponseMessage> Get(string route)
|
||||
public async Task<HttpResponseMessage> Get(string route,string From="")
|
||||
{
|
||||
var result = await _Http.GetAsync(route);
|
||||
return await Check(result);
|
||||
@@ -141,7 +141,14 @@ namespace HushianWebApp.Service
|
||||
else if (result.StatusCode == System.Net.HttpStatusCode.Forbidden)
|
||||
_ToastService.Notify(new ToastMessage(ToastType.Danger, "به این بخش دسترسی ندارید"));
|
||||
else if (result.StatusCode == System.Net.HttpStatusCode.NotFound)
|
||||
_ToastService.Notify(new ToastMessage(ToastType.Danger, "یافت نشد"));
|
||||
{
|
||||
string From ="" ;
|
||||
|
||||
if (result.RequestMessage.RequestUri.AbsolutePath.ToString().Contains("GetCompany")) From = "شرکت";
|
||||
|
||||
_ToastService.Notify(new ToastMessage(ToastType.Danger, $"{From} یافت نشد"));
|
||||
|
||||
}
|
||||
else if (!result.IsSuccessStatusCode)
|
||||
{
|
||||
|
||||
|
@@ -73,6 +73,9 @@ namespace HushianWebApp.Service
|
||||
return response.IsSuccessStatusCode;
|
||||
|
||||
}
|
||||
|
||||
public async Task<ChatItemDto> GetLastChatInCompany(int CompanyID)
|
||||
{
|
||||
return new();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user