-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Location의 이름 수정 메서드를 dto가 아닌 Location 객체가 들고 있도록 수정
- Loading branch information
Showing
3 changed files
with
7 additions
and
10 deletions.
There are no files selected for viewing
9 changes: 1 addition & 8 deletions
9
src/main/kotlin/dnd11th/blooming/api/dto/LocationModifyRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,5 @@ | ||
package dnd11th.blooming.api.dto | ||
|
||
import dnd11th.blooming.domain.entity.Location | ||
|
||
data class LocationModifyRequest( | ||
val name: String, | ||
) { | ||
fun modifyLocation(location: Location): Location { | ||
location.name = name | ||
return location | ||
} | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,4 +31,8 @@ class Location( | |
this.user = user | ||
user.locations.add(this) | ||
} | ||
|
||
fun modifyName(name: String) { | ||
this.name = name | ||
} | ||
} |