Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
vozmitelvlas committed Dec 22, 2024
2 parents 7dd9c76 + 590216a commit a1e70cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
2 changes: 2 additions & 0 deletions backend/src/main/java/ru/yandex/forms/model/Log.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package ru.yandex.forms.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand All @@ -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;
Expand Down
12 changes: 0 additions & 12 deletions backend/src/main/java/ru/yandex/forms/utils/DataLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ public void run(ApplicationArguments args) throws Exception {
userRepository.deleteAll();
logRepository.deleteAll();

logCreation();

userCreation();

formsCreation();
Expand All @@ -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("[email protected]");
logRepository.save(log);
}

private void userCreation(){
if (userRepository.findByEmail(SASHA_MAIL).isEmpty()){
User userSasha = new User();
Expand Down

0 comments on commit a1e70cc

Please sign in to comment.