fix: cache evict when updating
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
import net.miarma.backlib.dto.UserDto;
|
||||
import net.miarma.backlib.dto.UserWithCredentialDto;
|
||||
import net.miarma.backlib.exception.NotFoundException;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -203,6 +204,7 @@
|
||||
.toList();
|
||||
}
|
||||
|
||||
@CacheEvict(value = "members", allEntries = true)
|
||||
public MemberDto update(UUID userId, MemberDto changes) {
|
||||
try {
|
||||
huertosWebClient.updateUser(userId, new UserWithCredentialDto(changes.user(), changes.account()));
|
||||
|
||||
Reference in New Issue
Block a user