ru.foodtechlab.lib.auth.service.domain.confirmationCode.usecases.FindCodeBySessionUseCase Maven / Gradle / Ivy
package ru.foodtechlab.lib.auth.service.domain.confirmationCode.usecases;
import com.rcore.domain.commons.usecase.UseCase;
import com.rcore.domain.commons.usecase.model.SingleInput;
import com.rcore.domain.commons.usecase.model.SingleOutput;
import lombok.RequiredArgsConstructor;
import ru.foodtechlab.lib.auth.service.domain.confirmationCode.entity.ConfirmationCodeEntity;
import ru.foodtechlab.lib.auth.service.domain.confirmationCode.port.ConfirmationCodeRepository;
import java.util.Optional;
@RequiredArgsConstructor
public class FindCodeBySessionUseCase extends UseCase, SingleOutput>> {
private final ConfirmationCodeRepository repository;
@Override
public SingleOutput> execute(SingleInput authId) {
return SingleOutput.of(repository.findCodeBySession(authId.getValue()));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy