Skip to content

Commit

Permalink
refactor: response createdAt에 @jsonformat 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
mangowhoiscloud committed Nov 6, 2024
1 parent f7e357c commit f286a91
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import aimo.backend.domains.member.dto.request.UpdateNicknameRequest;
import aimo.backend.domains.member.dto.request.UpdatePasswordRequest;
import aimo.backend.infrastructure.s3.S3Service;
import aimo.backend.infrastructure.s3.dto.CreatePresignedUrlResponse;
import aimo.backend.infrastructure.s3.dto.SaveFileMetaDataRequest;
import aimo.backend.infrastructure.s3.dto.response.CreatePresignedUrlResponse;
import aimo.backend.infrastructure.s3.dto.request.SaveFileMetaDataRequest;

import aimo.backend.domains.member.service.MemberService;
import jakarta.mail.MessagingException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
import aimo.backend.common.mapper.MemberMapper;
import aimo.backend.domains.member.repository.MemberRepository;
import aimo.backend.domains.member.repository.ProfileImageRepository;
import aimo.backend.domains.post.entity.Post;
import aimo.backend.domains.post.service.PostService;
import aimo.backend.domains.privatePost.dto.request.CreateResourceUrlRequest;
import aimo.backend.infrastructure.s3.S3Service;
import aimo.backend.infrastructure.s3.dto.SaveFileMetaDataRequest;
import aimo.backend.infrastructure.s3.dto.request.SaveFileMetaDataRequest;
import aimo.backend.infrastructure.s3.model.PresignedUrlPrefix;
import aimo.backend.infrastructure.smtp.MailService;
import aimo.backend.util.memberLoader.MemberLoader;
Expand All @@ -33,7 +32,6 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Optional;
import java.util.UUID;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import java.time.LocalDateTime;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;

import aimo.backend.domains.comment.entity.ParentComment;
import aimo.backend.domains.member.entity.Member;
import lombok.AccessLevel;
Expand Down Expand Up @@ -37,6 +39,7 @@ public static class ParentCommentDto {
private final String content;
private final String nickname;
private final Integer likesCount;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private final LocalDateTime createdAt;
private final List<ChildCommentDto> childComments;

Expand Down Expand Up @@ -75,6 +78,7 @@ private static class ChildCommentDto {
private final String content;
private final String nickname;
private final Integer likesCount;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private final LocalDateTime createdAt;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
import aimo.backend.domains.privatePost.service.ChatRecordService;
import aimo.backend.domains.privatePost.service.PrivatePostService;

import aimo.backend.infrastructure.s3.dto.CreatePresignedUrlRequest;
import aimo.backend.infrastructure.s3.dto.CreatePresignedUrlResponse;
import aimo.backend.infrastructure.s3.dto.request.CreatePresignedUrlRequest;
import aimo.backend.infrastructure.s3.dto.response.CreatePresignedUrlResponse;
import jakarta.validation.Valid;

import aimo.backend.domains.privatePost.service.TextRecordService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import aimo.backend.domains.privatePost.entity.AudioRecord;
import aimo.backend.domains.privatePost.repository.AudioRecordRepository;
import aimo.backend.infrastructure.s3.S3Service;
import aimo.backend.infrastructure.s3.dto.CreatePresignedUrlRequest;
import aimo.backend.infrastructure.s3.dto.CreatePresignedUrlResponse;
import aimo.backend.infrastructure.s3.dto.request.CreatePresignedUrlRequest;
import aimo.backend.infrastructure.s3.dto.response.CreatePresignedUrlResponse;
import lombok.RequiredArgsConstructor;

@Service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import aimo.backend.common.properties.S3Properties;
import aimo.backend.domains.member.dto.request.CreateProfileImageUrlRequest;
import aimo.backend.domains.privatePost.dto.request.CreateResourceUrlRequest;
import aimo.backend.infrastructure.s3.dto.CreatePresignedUrlRequest;
import aimo.backend.infrastructure.s3.dto.CreatePresignedUrlResponse;
import aimo.backend.infrastructure.s3.dto.request.CreatePresignedUrlRequest;
import aimo.backend.infrastructure.s3.dto.response.CreatePresignedUrlResponse;
import aimo.backend.infrastructure.s3.model.PresignedUrlPrefix;
import lombok.RequiredArgsConstructor;

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package aimo.backend.infrastructure.s3.dto.request;

public record CreatePresignedUrlRequest(
String filename
) {
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package aimo.backend.infrastructure.s3.dto;
package aimo.backend.infrastructure.s3.dto.request;

import jakarta.validation.constraints.NotNull;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package aimo.backend.infrastructure.s3.dto;
package aimo.backend.infrastructure.s3.dto.response;

public record CreatePresignedUrlResponse(
String presignedUrl,
Expand Down

0 comments on commit f286a91

Please sign in to comment.