This commit is contained in:
mmrbnjd
2025-10-24 14:26:20 +03:30
parent 58975ce589
commit 214112a92a
21 changed files with 559 additions and 2893 deletions

View File

@@ -113,11 +113,19 @@ namespace HushianWebApp.Service
{
var response = await _baseController.Get($"{BaseRoute}User/LastOpenChatInCompany/{CompanyID}");
if (response.StatusCode==System.Net.HttpStatusCode.OK)
return await response.Content.ReadFromJsonAsync<ChatItemDto>();
return await response.Content.ReadFromJsonAsync<ChatItemDto?>();
return null;
}
public async Task<ChatItemDto?> Getchat(int ChatID)
public async Task<(int,int)?> GetLastChat()
{
var response = await _baseController.Get($"{BaseRoute}User/LastChat");
if (response.StatusCode == System.Net.HttpStatusCode.OK)
return await response.Content.ReadFromJsonAsync<(int, int)?>();
return null;
}
public async Task<ChatItemDto?> Getchat(int ChatID)
{
var response = await _baseController.Get($"{BaseRoute}User/Chat/{ChatID}");
if (response.StatusCode == System.Net.HttpStatusCode.OK)