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.UserDto;
|
||||||
import net.miarma.backlib.dto.UserWithCredentialDto;
|
import net.miarma.backlib.dto.UserWithCredentialDto;
|
||||||
import net.miarma.backlib.exception.NotFoundException;
|
import net.miarma.backlib.exception.NotFoundException;
|
||||||
|
import org.springframework.cache.annotation.CacheEvict;
|
||||||
import org.springframework.cache.annotation.Cacheable;
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -203,6 +204,7 @@
|
|||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@CacheEvict(value = "members", allEntries = true)
|
||||||
public MemberDto update(UUID userId, MemberDto changes) {
|
public MemberDto update(UUID userId, MemberDto changes) {
|
||||||
try {
|
try {
|
||||||
huertosWebClient.updateUser(userId, new UserWithCredentialDto(changes.user(), changes.account()));
|
huertosWebClient.updateUser(userId, new UserWithCredentialDto(changes.user(), changes.account()));
|
||||||
|
|||||||
Reference in New Issue
Block a user