Skip to content

Commit

Permalink
Add InMemoryUserRepository in fun saveAll
Browse files Browse the repository at this point in the history
  • Loading branch information
rudeh2926 committed Jan 11, 2024
1 parent 2387118 commit 97115f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ class InMemoryUserRepository(
private val userMap: HashMap<UUID, User> = hashMapOf()
) : UserRepositorySpi {

override suspend fun saveAll(user: List<User>) {
for (users in user) {
saveUser(users)
}
}

override suspend fun saveUser(user: User): User {
userMap[user.id] = user
return user
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import java.util.UUID
@Spi
interface UserRepositorySpi {

//TODO 2024 : 1/31 반환타입 추가하기
suspend fun saveAll(user: List<User>)

suspend fun saveUser(user: User): User
Expand Down

0 comments on commit 97115f6

Please sign in to comment.