Skip to content

Commit

Permalink
Merge pull request TeamMajorLink#96 from kchaeeun/refactor#94
Browse files Browse the repository at this point in the history
♻️ [REFACTOR] sender와 receiver에 동일한 user 정보가 저장되던 오류 해결
  • Loading branch information
kchaeeun authored Aug 22, 2024
2 parents 5c8b3b8 + 7f9dcce commit b3493a6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class User extends BaseEntity{

@Column(nullable = false, length = 20)
private String nickname;
@Column(nullable = false, length = 8)
@Column(nullable = false, length = 10)
private String birth;

@Column(nullable = false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void send(User sender, Long lectureId, String content) {
Lecture lecture = lectureRepository.findById(lectureId)
.orElseThrow(() -> new IllegalArgumentException("존재하지 않는 강의입니다."));

Notification notification = notificationRepository.save(createNotification(lecture.getUser(), lectureId, content));
Notification notification = notificationRepository.save(createNotification(sender, lectureId, content));
UUID receiverId = lecture.getUser().getId();

Map<String, SseEmitter> sseEmitters = emitterRepository.findAllEmitterStartWithByUserId(receiverId); // 알림 받는 사람 아이디
Expand Down
11 changes: 6 additions & 5 deletions majorLink/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,18 @@ spring:

data:
redis:
host: ${REDIS_AWS_ENDPOINT}
host: localhost
port: 6379
database: 1

server:
port: 8080
http2:
enabled: true
tomcat:
threads:
max: 200
enabled: false
# tomcat:
# threads:
# max: 200


logging:
level:
Expand Down

0 comments on commit b3493a6

Please sign in to comment.