Skip to content

Commit

Permalink
refactor: @RestController, delete data class
Browse files Browse the repository at this point in the history
  • Loading branch information
jojaeng2 committed Sep 18, 2023
1 parent 0fa5709 commit c358253
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ import joryu.sns_service.follow.dto.request.UnFollowRequest
import joryu.sns_service.follow.service.FollowService
import lombok.RequiredArgsConstructor
import org.springframework.http.ResponseEntity
import org.springframework.stereotype.Controller
import org.springframework.web.bind.annotation.*

@Controller
@RestController
@RequestMapping("/follow")
@RequiredArgsConstructor
class FollowController(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import joryu.sns_service.profile.entity.Profile

@Table(name = "follow")
@Entity
data class Follow(
class Follow(
@Id
@Column(name = "follow_id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@ import joryu.sns_service.profile.dto.request.ProfileCreateRequest
import joryu.sns_service.profile.dto.request.ProfileUpdateRequest
import joryu.sns_service.profile.dto.response.AllProfileResponse
import joryu.sns_service.profile.dto.response.ProfileInfoResponse
import joryu.sns_service.profile.entity.Profile
import joryu.sns_service.profile.service.ProfileService
import lombok.RequiredArgsConstructor
import org.springframework.http.HttpStatus
import org.springframework.http.ResponseEntity
import org.springframework.stereotype.Controller
import org.springframework.web.bind.annotation.*

@Controller
@RestController
@RequestMapping("/profile")
@RequiredArgsConstructor
class ProfileApiController(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import joryu.sns_service.profile.dto.request.ProfileUpdateRequest

@Table(name = "profile")
@Entity
data class Profile(
class Profile(
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "profile_id")
Expand Down

0 comments on commit c358253

Please sign in to comment.