Skip to content

Commit

Permalink
feat: 대학 정보 update field도 nullable하게 변경한다.
Browse files Browse the repository at this point in the history
  • Loading branch information
rlarltj committed Jul 29, 2024
1 parent 1600009 commit 738792f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import com.moneymong.global.security.token.dto.jwt.JwtAuthentication;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.web.bind.annotation.*;
Expand All @@ -31,7 +30,7 @@ public UserUniversityResponse getUserUniversity(
@PostMapping
public void createUserUniversity(
@AuthenticationPrincipal JwtAuthentication user,
@RequestBody @Valid CreateUserUniversityRequest request
@RequestBody CreateUserUniversityRequest request
) {
userUniversityService.create(user.getId(), request);
}
Expand All @@ -40,7 +39,7 @@ public void createUserUniversity(
@PatchMapping
public void updateUserUniversity(
@AuthenticationPrincipal JwtAuthentication user,
@RequestBody @Valid UpdateUserUniversityRequest request
@RequestBody UpdateUserUniversityRequest request
) {
userUniversityService.update(user.getId(), request);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.moneymong.domain.user.api.request;

import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand All @@ -11,10 +8,6 @@
@NoArgsConstructor
@AllArgsConstructor
public class UpdateUserUniversityRequest {
@NotBlank
private String universityName;

@Min(value = 1)
@Max(value = 5)
private int grade;
}

0 comments on commit 738792f

Please sign in to comment.