added liquibase db
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user