ru.foodtechlab.lib.auth.service.domain.confirmationCode.usecases.ConfirmConfirmationCodeUseCase 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.VoidOutputValues;
import lombok.RequiredArgsConstructor;
import ru.foodtechlab.lib.auth.service.domain.confirmationCode.entity.ConfirmationCodeEntity;
import ru.foodtechlab.lib.auth.service.domain.confirmationCode.port.ConfirmationCodeRepository;
@RequiredArgsConstructor
public class ConfirmConfirmationCodeUseCase extends UseCase, VoidOutputValues> {
private final ConfirmationCodeRepository repository;
@Override
public VoidOutputValues execute(SingleInput confirmationCodeEntitySingleInput) {
confirmationCodeEntitySingleInput.getValue().confirm();
repository.save(confirmationCodeEntitySingleInput.getValue());
return new VoidOutputValues();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy