This commit is contained in:
mmrbnjd
2025-07-26 16:52:59 +03:30
parent 258df5b360
commit 71f06b8ee8
7 changed files with 52 additions and 31 deletions

View File

@@ -1,5 +1,6 @@
using Common.Dtos.Conversation;
using Common.Enums;
using System.ComponentModel.Design;
using System.Net.Http.Json;
namespace HushianWebApp.Service
@@ -82,5 +83,13 @@ namespace HushianWebApp.Service
return new();
}
public async Task<int> NewConversationFromCurrentUser(ADD_ConversationDto conversation)
{
var response = await _baseController.Post($"{BaseRoute}NewConversationFromCurrentUser", conversation);
if (response.IsSuccessStatusCode)
return await response.Content.ReadFromJsonAsync<int>();
return -1;
}
}
}