From 010ad9c33647b0a1eee4620ea52c115457fd6a9d Mon Sep 17 00:00:00 2001 From: XyL1GaN4eG Date: Sat, 27 Jul 2024 12:30:41 +0300 Subject: [PATCH] Some refactor and add logs --- .../weatherproject/tgbotservice/clients/GeocodingClient.java | 2 +- .../tgbotservice/telegram/callbacks/StartCallback.java | 2 -- .../tgbotservice/telegram/commands/UpdateCommand.java | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/tgBotService/src/main/java/weatherproject/tgbotservice/clients/GeocodingClient.java b/tgBotService/src/main/java/weatherproject/tgbotservice/clients/GeocodingClient.java index ace0d26..51936ff 100644 --- a/tgBotService/src/main/java/weatherproject/tgbotservice/clients/GeocodingClient.java +++ b/tgBotService/src/main/java/weatherproject/tgbotservice/clients/GeocodingClient.java @@ -30,7 +30,7 @@ public String getCityByCoordinates(double latitude, double longitude) { .queryParam("lat", latitude) .queryParam("lon", longitude) .toUriString(); - log.debug("Пробуем получить название города с координатами {}, {} по следующему API запросу {}", latitude, longitude, url); + log.info("Пробуем получить название города с координатами {}, {} по следующему API запросу {}", latitude, longitude, url); try { // Выполнение GET запроса и получение ответа в виде строки diff --git a/tgBotService/src/main/java/weatherproject/tgbotservice/telegram/callbacks/StartCallback.java b/tgBotService/src/main/java/weatherproject/tgbotservice/telegram/callbacks/StartCallback.java index d72f2ed..211e92b 100644 --- a/tgBotService/src/main/java/weatherproject/tgbotservice/telegram/callbacks/StartCallback.java +++ b/tgBotService/src/main/java/weatherproject/tgbotservice/telegram/callbacks/StartCallback.java @@ -3,10 +3,8 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; -import weatherproject.tgbotservice.clients.GeocodingClient; import weatherproject.tgbotservice.clients.GoogleTranslateClient; import weatherproject.tgbotservice.clients.UserServiceClient; -import weatherproject.tgbotservice.clients.WeatherServiceClient; import weatherproject.tgbotservice.dto.UserDTO; import weatherproject.tgbotservice.dto.WeatherDTO; diff --git a/tgBotService/src/main/java/weatherproject/tgbotservice/telegram/commands/UpdateCommand.java b/tgBotService/src/main/java/weatherproject/tgbotservice/telegram/commands/UpdateCommand.java index 85d5064..3eeb2e0 100644 --- a/tgBotService/src/main/java/weatherproject/tgbotservice/telegram/commands/UpdateCommand.java +++ b/tgBotService/src/main/java/weatherproject/tgbotservice/telegram/commands/UpdateCommand.java @@ -3,7 +3,6 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; -import org.springframework.web.context.WebApplicationContext; import org.telegram.telegrambots.meta.api.methods.send.SendMessage; import org.telegram.telegrambots.meta.api.objects.Update; import weatherproject.tgbotservice.clients.GoogleTranslateClient; @@ -20,7 +19,6 @@ public class UpdateCommand implements Command { private final WeatherServiceClient weatherServiceClient; private final GoogleTranslateClient translateClient; - private final WebApplicationContext webApplicationContext; @Override public SendMessage apply(UserDTO currentUser, Update update) {