Skip to content

Commit

Permalink
feat/VIC-786_Advice_seeker_books_a_meeting
Browse files Browse the repository at this point in the history
  • Loading branch information
adnanalicic committed Jun 29, 2022
1 parent 4c5eb26 commit 12de380
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/userservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2292,6 +2292,9 @@ components:
uniqueItems: true
items:
$ref: '#/components/schemas/EmailToggle'
appointmentFeatureActive:
type: boolean
example: true

PatchUserDTO:
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,6 @@ public class UserDataResponseDTO {
private Boolean isWalkThroughEnabled;

private Set<EmailToggle> emailToggles;

private Boolean appointmentFeatureActive;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

@Service
public class UserDtoMapper {

@Value("${appointment.feature.active}")
private boolean appointmentFeatureActive;

public UserDataResponseDTO userDataOf(UserDataResponseDTO userData, OtpInfoDTO otpInfoDTO,
boolean isE2eEncEnabled, boolean isDisplayNameAllowed) {
var twoFactorAuthDTO = new TwoFactorAuthDTO();
Expand All @@ -48,6 +52,8 @@ public UserDataResponseDTO userDataOf(UserDataResponseDTO userData, OtpInfoDTO o
isDisplayNameAllowed && userData.getUserRoles().contains(UserRole.CONSULTANT.getValue())
);

userData.setAppointmentFeatureActive(appointmentFeatureActive);

return userData;
}

Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,5 @@ hibernate.current_session_context_class=org.hibernate.context.internal.ThreadLoc
appointments.delete-job-cron=0 0 0 * * ?
appointments.delete-job-enabled=false
appointments.lifespan-in-hours=24

appointment.feature.active=false

0 comments on commit 12de380

Please sign in to comment.