Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
SangWoon123 committed Oct 3, 2024
1 parent fd632ed commit 1f9a682
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,9 @@ public GroupResponse updateGroupNameOrDescription(UserInfo userInfo, GroupUpdate
}

public void deleteGroup(UserInfo userInfo, String groupCode) {
User user = userQueryService.getUserByUserCode(userInfo.getUserCode());
GroupRoom groupRoom = groupQueryService.getGroupByCode(groupCode);

if (!groupRoom.getOwner().equals(user.getUserCode())) {
if (!groupRoom.getOwner().equals(userInfo.getUserCode())) {
throw new BusinessException(ErrorCode.ACCESS_DENIED);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ public class Notification extends BaseEntity {
private boolean isRead = false;

@Builder
public Notification(String userCode,String title, String message, String groupName, String url, NotificationType notificationType, LocalDate scheduleDate, boolean isRead) {
public Notification(String userCode, String title, String message, String groupName, String url, NotificationType notificationType, LocalDate scheduleDate, boolean isRead) {
this.userCode = userCode;
this.title=title;
this.title = title;
this.message = message;
this.groupName = groupName;
this.url = url;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;

import java.util.List;
import java.util.stream.Collectors;

@Service
@RequiredArgsConstructor
Expand Down Expand Up @@ -47,7 +46,6 @@ public void markNotificationAsRead(NotificationReadRequest notificationReadReque
@Transactional(readOnly = true)
public List<NotificationScheduleResponse> getNotifications(UserInfo userInfo) {
return notificationRepository.findByUserCode(userInfo.getUserCode());

}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public List<Schedule> findWeeklyPersonalScheduleByUser(LocalDate startDate, Loca
.innerJoin(schedule.personalSchedule, personalSchedule)
.where(schedule.scheduleDate.between(startDate, endDate)
.and(personalSchedule.user.id.eq(userId)))
.orderBy(schedule.startTime.asc())
.fetch();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ public List<PersonalScheduleResponse> getWeekSchedule(LocalDate startDate, Local
return scheduleQueryService.findWeeklyPersonalScheduleByUser(startDate, endDate, userInfo.getId())
.stream()
.map(PersonalScheduleResponse::from)
.sorted(PersonalScheduleResponse.getComparatorByStartTime())
.collect(Collectors.toList());
}

Expand Down

0 comments on commit 1f9a682

Please sign in to comment.