This commit is contained in:
mmrbnjd
2025-07-30 16:39:37 +03:30
parent b3167b83b9
commit 5731c9ff97
6 changed files with 48 additions and 12 deletions

View File

@@ -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)
{

View File

@@ -73,6 +73,9 @@ namespace HushianWebApp.Service
return response.IsSuccessStatusCode;
}
public async Task<ChatItemDto> GetLastChatInCompany(int CompanyID)
{
return new();
}
}
}