Skip to content

Commit

Permalink
Remove cached users endpoint
Browse files Browse the repository at this point in the history
It was breaking data consistency
  • Loading branch information
spolnik authored Sep 17, 2018
1 parent 28e40ec commit e500523
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/main/kotlin/com/jalgoarena/web/UsersController.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.jalgoarena.web
import com.jalgoarena.domain.User
import com.jalgoarena.data.UserRepository
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.cache.annotation.Cacheable
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PutMapping
Expand All @@ -16,7 +15,6 @@ open class UsersController(
@Autowired private val usersRepository: UserRepository
) {

@Cacheable("users")
@GetMapping("/users", produces = ["application/json"])
open fun publicUsers() =
usersRepository.findAll().map { it.copy(password = "") }
Expand Down

0 comments on commit e500523

Please sign in to comment.