Skip to content

Commit

Permalink
add port 5557 in properties. add sentFromNickname in LastMessageRespo…
Browse files Browse the repository at this point in the history
…nseDto.
  • Loading branch information
LionnoiL committed May 7, 2024
1 parent 775dd47 commit f737ae2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
@Server(
description = "Local ENV",
url = "http://localhost:8080"
),@Server(
description = "Local ENV 2",
url = "http://localhost:5557"
),
@Server(
description = "PROD ENV",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class LastMessageResponseDto {
private static final int MAX_LENGTH = 20;

private LocalDateTime timestamp;
private String sentFromNickname;
private String sentFrom;
private String lastMessage;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ private void sendToTopic(Integer topicId, MessageResponseDto messageDto) {
lastMessageDto.setTimestamp(messageDto.getTimestamp());
lastMessageDto.setSentFrom(messageDto.getSentFrom());
lastMessageDto.setLastMessage(messageDto.getContent());
lastMessageDto.setSentFromNickname(messageDto.getSentFromNickname());

contactEventService.updateMessageInfoForAllTopicSubscribers(topicId, lastMessageDto);

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ security.jwt.expiration=3600000
security.jwt.refresh-expiration=604800000

#CORS:
cors.allowed-origins=${CORS_ORIGINS:http://localhost:8080,http://localhost:3000}
cors.allowed-origins=${CORS_ORIGINS:http://localhost:8080,http://localhost:3000,http://localhost:5557}
cors.allowed-methods=GET, POST, PUT, PATCH, DELETE
cors.allowed-headers=*
cors.allow-credentials=true
Expand Down

0 comments on commit f737ae2

Please sign in to comment.