Skip to content

Commit

Permalink
Merge pull request #116 from Team-FAB/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
yjjjwww committed Jun 30, 2023
2 parents af93b83 + 202aff4 commit f344771
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,6 @@ jobs:
echo "${{ secrets.API_ENV }}" | base64 --decode > api.env
echo "${{ secrets.MONGO_ENV }}" | base64 --decode > mongo.env
sudo chmod 666 /var/run/docker.sock
sudo docker pull yjjjwww/banggabgo
sudo docker compose up -d --build
sudo docker image prune -f
7 changes: 4 additions & 3 deletions src/main/java/com/fab/banggabgo/dto/chat/ChatDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@
@NoArgsConstructor
@AllArgsConstructor
public class ChatDto {

private String roomId;
private String userName;
private String userEmail;
private String msg;
private LocalDateTime createDate;

public static ChatDto toDto(Chat chat){
public static ChatDto toDto(Chat chat) {
return ChatDto.builder()
.roomId(chat.getRoomId())
.userName(chat.getUserEmail())
.userEmail(chat.getUserEmail())
.msg(chat.getMsg())
.createDate(chat.getCreateDate())
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
@NoArgsConstructor
@AllArgsConstructor
public class RequestChatDto {
private String username;
private String userEmail;
private String msg;
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public List<ChatDto> getChatLogs(String roomId){
public Chat saveMsg(String roomId,RequestChatDto dto){
var chat =Chat.builder()
.roomId(roomId)
.userEmail(dto.getUsername())
.userEmail(dto.getUserEmail())
.msg(dto.getMsg())
.build();
return chatRepository.save(chat);
Expand Down

0 comments on commit f344771

Please sign in to comment.