Skip to content

Commit 18a4ccc

Browse files
committed
Исправлены ошибки по проверке Github
1 parent 0ed2049 commit 18a4ccc

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

main-service/src/main/java/ru/practicum/ewm/event/dto/EventMapper.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
public class EventMapper {
1010

1111
public static Event toEvent(NewEventDto newEventDto) {
12-
return new Event().builder()
12+
return Event.builder()
1313
.annotation(newEventDto.getAnnotation())
1414
.description(newEventDto.getDescription())
1515
.eventDate(newEventDto.getEventDate())
@@ -22,7 +22,7 @@ public static Event toEvent(NewEventDto newEventDto) {
2222
}
2323

2424
public static EventFullDto toEventFullDto(Event event) {
25-
return new EventFullDto().builder()
25+
return EventFullDto.builder()
2626
.id(event.getId())
2727
.annotation(event.getAnnotation())
2828
.category(CategoryMapper.toCategoryDto(event.getCategory()))
@@ -43,7 +43,7 @@ public static EventFullDto toEventFullDto(Event event) {
4343
}
4444

4545
public static EventShortDto toEventShortDto(Event event) {
46-
return new EventShortDto().builder()
46+
return EventShortDto.builder()
4747
.id(event.getId())
4848
.annotation(event.getAnnotation())
4949
.category(CategoryMapper.toCategoryDto(event.getCategory()))
@@ -57,7 +57,7 @@ public static EventShortDto toEventShortDto(Event event) {
5757
}
5858

5959
public static UpdateEventRequest toUpdateEventRequest(UpdateEventUserRequest event) {
60-
return new UpdateEventRequest().builder()
60+
return UpdateEventRequest.builder()
6161
.annotation(event.getAnnotation())
6262
.category(event.getCategory())
6363
.description(event.getDescription())
@@ -71,7 +71,7 @@ public static UpdateEventRequest toUpdateEventRequest(UpdateEventUserRequest eve
7171
}
7272

7373
public static UpdateEventRequest toUpdateEventRequest(UpdateEventAdminRequest event) {
74-
return new UpdateEventRequest().builder()
74+
return UpdateEventRequest.builder()
7575
.annotation(event.getAnnotation())
7676
.category(event.getCategory())
7777
.description(event.getDescription())

main-service/src/main/resources/application.properties

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,31 @@ server.port=8080
22
client.url=http://localhost:9090
33
#stat-service.url=http://stat-service:9090
44
#application.name=ewm-main-service
5+
56
spring.jpa.hibernate.ddl-auto=update
67
spring.jpa.properties.hibernate.format_sql=true
78
spring.sql.init.mode=always
89
hibernate.show_sql=true
910
hibernate.jdbc.time_zone=UTC
11+
1012
#spring.datasource.url=jdbc:postgresql://localhost:5433/main_db
1113
#spring.datasource.username=explore
1214
#spring.datasource.password=explore
1315
#spring.datasource.driver-class-name=org.postgresql.Driver
16+
1417
logging.level.org.springframework.orm.jpa=INFO
1518
logging.level.org.springframework.transaction=INFO
1619
logging.level.org.springframework.transaction.interceptor=INFO
1720
logging.level.org.springframework.orm.jpa.JpaTransactionManager=INFO
21+
1822
jdbc.driverClassName=org.postgresql.Driver
1923
jdbc.url=jdbc:postgresql://localhost:5433/main_db
2024
jdbc.username=explore
2125
jdbc.password=explore
22-
spring.config.activate.on-profile=ci,test
23-
spring.datasource.driverClassName=org.h2.Driver
24-
spring.datasource.url=jdbc:h2:mem:main-db
25-
spring.datasource.username=test
26-
spring.datasource.password=test
26+
27+
#spring.config.activate.on-profile=ci,test
28+
#spring.datasource.driverClassName=org.h2.Driver
29+
#spring.datasource.url=jdbc:h2:mem:main-db
30+
#spring.datasource.username=test
31+
#spring.datasource.password=test
2732

0 commit comments

Comments
 (0)