...
This commit is contained in:
@@ -53,14 +53,18 @@ namespace HushianWebApp.Service
|
||||
|
||||
return new();
|
||||
}
|
||||
public async Task ADDConversationItemFromCompanySide(int ConversationID,string text, ConversationType type)
|
||||
public async Task<Read_ConversationResponseDto?> ADDConversationItem(int ConversationID,string text, ConversationType type)
|
||||
{
|
||||
var response = await _baseController.Post($"{BaseRoute}ADDConversationResponse",new ADD_ConversationResponseDto()
|
||||
{
|
||||
ConversationID = ConversationID,
|
||||
Text=text,
|
||||
Type=type
|
||||
});
|
||||
});
|
||||
if (response.IsSuccessStatusCode)
|
||||
return await response.Content.ReadFromJsonAsync<Read_ConversationResponseDto>();
|
||||
return null;
|
||||
|
||||
}
|
||||
public async Task<bool> ConversationIsFinish(int ConversationID)
|
||||
{
|
||||
@@ -83,13 +87,13 @@ namespace HushianWebApp.Service
|
||||
|
||||
return new();
|
||||
}
|
||||
public async Task<int> NewConversationFromCurrentUser(ADD_ConversationDto conversation)
|
||||
public async Task<Read_ConversationDto> NewConversationFromCurrentUser(ADD_ConversationDto conversation)
|
||||
{
|
||||
var response = await _baseController.Post($"{BaseRoute}NewConversationFromCurrentUser", conversation);
|
||||
if (response.IsSuccessStatusCode)
|
||||
return await response.Content.ReadFromJsonAsync<int>();
|
||||
return await response.Content.ReadFromJsonAsync<Read_ConversationDto>();
|
||||
|
||||
return -1;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user