Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

배포 전 여러가지 버그 수정 #794

Merged
merged 3 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.votogether.domain.alarm.controller;

import com.votogether.domain.alarm.dto.ReportActionAlarmResponse;
import com.votogether.domain.alarm.dto.ReportActionResponse;
import com.votogether.domain.alarm.dto.response.ReportActionAlarmResponse;
import com.votogether.domain.alarm.dto.response.ReportActionResponse;
import com.votogether.domain.alarm.dto.response.PostAlarmResponse;
import com.votogether.domain.alarm.service.AlarmQueryService;
import com.votogether.domain.member.entity.Member;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.votogether.domain.alarm.controller;

import com.votogether.domain.alarm.dto.ReportActionAlarmResponse;
import com.votogether.domain.alarm.dto.ReportActionResponse;
import com.votogether.domain.alarm.dto.response.ReportActionAlarmResponse;
import com.votogether.domain.alarm.dto.response.ReportActionResponse;
import com.votogether.domain.alarm.dto.response.PostAlarmResponse;
import com.votogether.domain.member.entity.Member;
import com.votogether.global.exception.ExceptionResponse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.votogether.domain.alarm.dto;
package com.votogether.domain.alarm.dto.response;

import com.votogether.domain.alarm.entity.ReportActionAlarm;
import io.swagger.v3.oas.annotations.media.Schema;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.votogether.domain.alarm.dto;
package com.votogether.domain.alarm.dto.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.votogether.domain.alarm.entity.ReportActionAlarm;
import com.votogether.domain.report.entity.vo.ReportType;
import io.swagger.v3.oas.annotations.media.Schema;
Expand All @@ -23,6 +24,7 @@ public record ReportActionResponse(
Set<String> reasons,

@Schema(description = "신고조치시간", example = "2023-08-01 13:56")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
LocalDateTime createdAt
) {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.votogether.domain.alarm.service;

import com.votogether.domain.alarm.dto.ReportActionAlarmResponse;
import com.votogether.domain.alarm.dto.ReportActionResponse;
import com.votogether.domain.alarm.dto.response.ReportActionAlarmResponse;
import com.votogether.domain.alarm.dto.response.ReportActionResponse;
import com.votogether.domain.alarm.dto.response.PostAlarmResponse;
import com.votogether.domain.alarm.entity.Alarm;
import com.votogether.domain.alarm.entity.ReportActionAlarm;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public record MemberInfoResponse(
long voteCount,

@Schema(description = "권한", example = "MEMBER")
Roles roles,
Roles role,

@Schema(description = "최신 알림 존재 여부", example = "false")
boolean hasLatestAlarm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private void publishAlarmEvent(final Member loginMember, final Post post) {
return;
}
final PostAlarmEvent postAlarmEvent = new PostAlarmEvent(
loginMember,
post.getWriter(),
post.getId(),
AlarmType.COMMENT,
post.getTitle()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter {

private static final Map<String, String> MATCH_URI_METHOD = new HashMap<>(
Map.ofEntries(
Map.entry("^/posts/.+/comments$", "GET")
Map.entry("^/posts/.+/comments$", "GET"),
Map.entry("^/notices/.*$", "GET")
)
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.BDDMockito.given;

import com.votogether.domain.alarm.dto.ReportActionAlarmResponse;
import com.votogether.domain.alarm.dto.ReportActionResponse;
import com.votogether.domain.alarm.dto.response.ReportActionAlarmResponse;
import com.votogether.domain.alarm.dto.response.ReportActionResponse;
import com.votogether.domain.alarm.dto.response.PostAlarmDetailResponse;
import com.votogether.domain.alarm.dto.response.PostAlarmResponse;
import com.votogether.domain.alarm.entity.ReportActionAlarm;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.SoftAssertions.assertSoftly;

import com.votogether.domain.alarm.dto.ReportActionAlarmResponse;
import com.votogether.domain.alarm.dto.ReportActionResponse;
import com.votogether.domain.alarm.dto.response.ReportActionAlarmResponse;
import com.votogether.domain.alarm.dto.response.ReportActionResponse;
import com.votogether.domain.alarm.dto.response.PostAlarmDetailResponse;
import com.votogether.domain.alarm.dto.response.PostAlarmResponse;
import com.votogether.domain.alarm.entity.ReportActionAlarm;
Expand Down Expand Up @@ -61,7 +61,7 @@ void whenCreateComment() throws Exception {
Thread.sleep(1000);

// when
List<PostAlarmResponse> postAlarmResponses = alarmQueryService.getPostAlarm(commentWriter, 0);
List<PostAlarmResponse> postAlarmResponses = alarmQueryService.getPostAlarm(post.getWriter(), 0);

// then
PostAlarmResponse postAlarmResponse = postAlarmResponses.get(0);
Expand Down
Loading