fix: ajustes
This commit is contained in:
parent
0efb2ac75d
commit
bd0f910f1b
@ -20,6 +20,7 @@ namespace ChatApi.Services.Bot
|
||||
public Task<Result<string>> Call()
|
||||
{
|
||||
var httpClient =_httpClientFactory.CreateClient();
|
||||
httpClient.Timeout = TimeSpan.FromSeconds(120);
|
||||
var url = new Uri(new Uri(_configuration.Url), _configuration.Create);
|
||||
var request = new HttpRequestMessage(HttpMethod.Post, url);
|
||||
request.Content = new StringContent(System.Text.Json.JsonSerializer.Serialize(_callRH), Encoding.UTF8, "application/json");
|
||||
@ -35,6 +36,7 @@ namespace ChatApi.Services.Bot
|
||||
try
|
||||
{
|
||||
errorContent = response.Content.ReadAsStringAsync().Result;
|
||||
if (errorContent.ToLower().Contains("timeout")) errorContent = "O servidor do pipefy demorou um pouco para responder. Verifique se a solicitação foi aberta em seu email!";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@ -70,7 +70,7 @@ namespace ChatApi.Services.ResponseService
|
||||
}
|
||||
else
|
||||
{
|
||||
resp = "Quero abrir um anova solicitação ao RH.";
|
||||
resp = "Quero abrir uma nova solicitação ao RH.";
|
||||
await GetResponse(context, userData, sessionId, resp, true);
|
||||
}
|
||||
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
{
|
||||
"DomvsDatabase": {
|
||||
"ConnectionString": "mongodb://localhost:27017",
|
||||
"ConnectionString": "mongodb+srv://rrcgoncalves:zSYxeWCcY7QlmAmF@cluster0.bmjlo.mongodb.net/?authMechanism=DEFAULT",
|
||||
"DatabaseName": "DomvsSites",
|
||||
"SharepointCollectionName": "SharepointSite",
|
||||
"ChatBotRHCollectionName": "ChatBotRHData",
|
||||
"ClassifierCollectionName": "ClassifierData"
|
||||
},
|
||||
"ChatRHSettings": {
|
||||
"Url": "https://localhost:7070/",
|
||||
"Url": "http://localhost:8070/",
|
||||
"Create": "/CallRH"
|
||||
},
|
||||
"Logging": {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"DomvsDatabase": {
|
||||
"ConnectionString": "mongodb://localhost:27017",
|
||||
"ConnectionString": "mongodb+srv://rrcgoncalves:zSYxeWCcY7QlmAmF@cluster0.bmjlo.mongodb.net/?authMechanism=DEFAULT",
|
||||
"DatabaseName": "DomvsSites",
|
||||
"SharepointCollectionName": "SharepointSite",
|
||||
"ChatBotRHCollectionName": "ChatBotRHData",
|
||||
@ -8,7 +8,7 @@
|
||||
"UserDataName": "UserData"
|
||||
},
|
||||
"ChatRHSettings": {
|
||||
"Url": "mongodb://localhost:27017",
|
||||
"Url": "http://localhost:8070/",
|
||||
"Create": "DomvsSites"
|
||||
},
|
||||
"Logging": {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user