diff --git a/backend/src/main/java/ru/yandex/forms/model/Log.java b/backend/src/main/java/ru/yandex/forms/model/Log.java index 65171a9..d83e478 100644 --- a/backend/src/main/java/ru/yandex/forms/model/Log.java +++ b/backend/src/main/java/ru/yandex/forms/model/Log.java @@ -1,5 +1,6 @@ package ru.yandex.forms.model; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; @@ -23,6 +24,7 @@ public class Log { private String editEmail; + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "UTC") private Instant editTime; private String eventType; diff --git a/backend/src/main/java/ru/yandex/forms/utils/DataLoader.java b/backend/src/main/java/ru/yandex/forms/utils/DataLoader.java index 1b3f626..4e329b2 100644 --- a/backend/src/main/java/ru/yandex/forms/utils/DataLoader.java +++ b/backend/src/main/java/ru/yandex/forms/utils/DataLoader.java @@ -49,8 +49,6 @@ public void run(ApplicationArguments args) throws Exception { userRepository.deleteAll(); logRepository.deleteAll(); - logCreation(); - userCreation(); formsCreation(); @@ -59,16 +57,6 @@ public void run(ApplicationArguments args) throws Exception { } - private void logCreation() { - Log log = new Log(); - log.setFormId("sampleid"); - log.setEditAction("sampleEdit"); - log.setEditTime(Instant.now()); - log.setEventType("sampleType"); - log.setEditEmail("sashaOwner@mail.ru"); - logRepository.save(log); - } - private void userCreation(){ if (userRepository.findByEmail(SASHA_MAIL).isEmpty()){ User userSasha = new User();