added liquibase db

This commit is contained in:
SlimusMinus
2026-03-30 00:12:26 +03:00
parent a35856ac8d
commit 08f7b18218
27 changed files with 150 additions and 440 deletions

View File

@@ -4,7 +4,6 @@ import com.krylov.refound.entity.User;
import com.krylov.refound.enums.ErrorCode;
import com.krylov.refound.exception.ApiException;
import com.krylov.refound.repository.UserRepository;
import com.krylov.refound.util.SecurityUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;
@@ -15,9 +14,8 @@ public class UserService {
private final UserRepository repository;
public User getCurrentUser() {
String email = SecurityUtils.getCurrentUserEmail();
return repository.findByEmail(email)
return repository.findByEmail("moscow_city231@rambler.ru")
.orElseThrow(() -> new ApiException(
ErrorCode.NOT_FOUND,
"User not found",