Skip to content

Commit

Permalink
[#6] fix: 불필요한 코드 및 포맷 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
YehyeokBang committed Oct 13, 2024
1 parent f187723 commit a442f35
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

@Builder
public record GatheringResponseDto(
Long id,
String title,
String category,
String description,
Expand All @@ -23,6 +24,7 @@ public record GatheringResponseDto(
) {
public static GatheringResponseDto from(Gathering gathering) {
return GatheringResponseDto.builder()
.id(gathering.getId())
.title(gathering.getTitle())
.category(String.valueOf(gathering.getCategory()))
.description(gathering.getDescription())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package dev.office.networkoffice.gatheringUser.controller;

import dev.office.networkoffice.gatheringUser.controller.docs.GatheringUserApiDocs;
import dev.office.networkoffice.gatheringUser.controller.request.ChangeStatusDto;
import dev.office.networkoffice.gatheringUser.controller.response.ApplicantUserDto;
import dev.office.networkoffice.gatheringUser.controller.dto.request.ChangeStatusDto;
import dev.office.networkoffice.gatheringUser.controller.dto.response.ApplicantUserDto;
import dev.office.networkoffice.gatheringUser.service.GatheringUserService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
Expand Down Expand Up @@ -32,8 +32,8 @@ public ApplicantUserDto getApplicantsInGatheringByHost(Principal principal,

@PatchMapping("{applicantId}/status")
public void patchApplicantStatusByHost(Principal principal,
@PathVariable(name = "applicantId") Long applicantId,
@RequestBody ChangeStatusDto changeStatusDto) {
@PathVariable(name = "applicantId") Long applicantId,
@RequestBody ChangeStatusDto changeStatusDto) {
Long userId = getUserId(principal);
gatheringUserService.patchApplicantStatus(userId, applicantId, changeStatusDto);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package dev.office.networkoffice.gatheringUser.controller.docs;

import dev.office.networkoffice.gatheringUser.controller.request.ChangeStatusDto;
import dev.office.networkoffice.gatheringUser.controller.response.ApplicantUserDto;
import dev.office.networkoffice.gatheringUser.controller.dto.request.ChangeStatusDto;
import dev.office.networkoffice.gatheringUser.controller.dto.response.ApplicantUserDto;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

import java.security.Principal;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.office.networkoffice.gatheringUser.controller.request;
package dev.office.networkoffice.gatheringUser.controller.dto.request;

import dev.office.networkoffice.gatheringUser.domain.GatheringUserStatus;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.office.networkoffice.gatheringUser.controller.response;
package dev.office.networkoffice.gatheringUser.controller.dto.response;

import dev.office.networkoffice.gatheringUser.domain.GatheringUser;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ private GatheringUser(Long id, Gathering gathering, User user) {
this.gatheringUserStatus = GatheringUserStatus.APPLY_USER;
}

public void updateApplicantStatus(GatheringUserStatus status, String reason){
switch (status){
public void updateApplicantStatus(GatheringUserStatus status, String reason) {
switch (status) {
case DENIED_USER -> denyApplicants(reason);
case DEPORTATION_USER -> deportApplicants(reason);
case CONFIRMED_USER -> confirmApplicants();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dev.office.networkoffice.gatheringUser.service;

import dev.office.networkoffice.gatheringUser.controller.request.ChangeStatusDto;
import dev.office.networkoffice.gatheringUser.controller.response.ApplicantUserDto;
import dev.office.networkoffice.gatheringUser.controller.dto.request.ChangeStatusDto;
import dev.office.networkoffice.gatheringUser.controller.dto.response.ApplicantUserDto;
import dev.office.networkoffice.gatheringUser.domain.GatheringUserStatus;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
Expand Down

0 comments on commit a442f35

Please sign in to comment.