some refactor

This commit is contained in:
2026-01-07 16:54:53 +03:00
parent e7af1ffb0b
commit 3be30aabe8
2 changed files with 10 additions and 8 deletions

View File

@@ -7,6 +7,8 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;
import ru.ldeloff.aitools.datetime.dto.TimeResponse;
import java.time.ZoneId;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
@@ -29,12 +31,4 @@ public class TimeController {
return new TimeResponse(moscowTime.format(formatter));
});
}
public static class TimeResponse {
public final String time;
public TimeResponse(String time) {
this.time = time;
}
}
}

View File

@@ -0,0 +1,8 @@
package ru.ldeloff.aitools.datetime.dto;
import lombok.AllArgsConstructor;
@AllArgsConstructor
public class TimeResponse {
public final String time;
}