Skip to content

Commit

Permalink
#826 | refactor: variable name change for default org password after …
Browse files Browse the repository at this point in the history
…review
  • Loading branch information
vedfordev committed Dec 12, 2024
1 parent 856d903 commit a6c219b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@Service
public class MetabaseService {

@Value("${avni.org.password}")
@Value("${avni.default.org.user.db.password}")
private String AVNI_DEFAULT_ORG_USER_DB_PASSWORD;
public static final String DB_ENGINE = "postgres";
private final OrganisationService organisationService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class OrganisationController implements RestControllerResourceProcessor<O
private final OrganisationCategoryRepository organisationCategoryRepository;
private final OrganisationStatusRepository organisationStatusRepository;

@Value("${avni.org.password}")
@Value("${avni.default.org.user.db.password}")
private String AVNI_DEFAULT_ORG_USER_DB_PASSWORD;

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
@RestController
public class OrganisationGroupController implements RestControllerResourceProcessor<OrganisationGroup> {

@Value("${avni.org.password}")
@Value("${avni.default.org.user.db.password}")
private String AVNI_DEFAULT_ORG_USER_DB_PASSWORD;
private final Logger logger;
private final OrganisationGroupRepository organisationGroupRepository;
Expand Down
2 changes: 1 addition & 1 deletion avni-server-api/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,4 @@ metabase.api.key=${METABASE_API_KEY:mb_uhFRMqCSre4v/hTZTsQcMnh8k2GCZFX2tGmSBdoxN
avni.endpoints.endOfLife.1=${AVNI_ENDPOINT_END_OF_LIFE_1:2024-09-05}

#default org configuration
avni.org.password=${AVNI_ORG_PASSWORD:password}
avni.default.org.user.db.password=${AVNI_DEFAULT_ORG_USER_DB_PASSWORD:password}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public class TestOrganisationService {
private final UserRepository userRepository;
private final TestWebContextService testWebContextService;
private final OrganisationService organisationService;
@Value("${avni.org.password}")
private String DEFAUT_PASSWORD;
@Value("${avni.default.org.user.db.password}")
private String AVNI_DEFAULT_ORG_USER_DB_PASSWORD;

@Autowired
public TestOrganisationService(ImplementationRepository implementationRepository, OrganisationRepository organisationRepository, UserRepository userRepository, TestWebContextService testWebContextService, OrganisationService organisationService) {
Expand All @@ -33,7 +33,7 @@ public TestOrganisationService(ImplementationRepository implementationRepository
public void createOrganisation(Organisation organisation, User adminUser) {
organisationRepository.save(organisation);
User orgUser = createUser(organisation, adminUser);
implementationRepository.createDBUser(organisation.getDbUser(),DEFAUT_PASSWORD);
implementationRepository.createDBUser(organisation.getDbUser(),AVNI_DEFAULT_ORG_USER_DB_PASSWORD);
testWebContextService.setUser(orgUser);
organisationService.setupBaseOrganisationMetadata(organisation);
}
Expand Down
2 changes: 1 addition & 1 deletion avni-server-api/src/test/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@ metabase.api.key=${METABASE_API_KEY:mb_hwsYP2sFN7fvwM5LTS4d/tnIqA5SeHUxwUhm2KAI1
avni.endpoints.endOfLife.1=2024-09-09

#default org configuration
avni.org.password=${AVNI_ORG_PASSWORD:password}
avni.default.org.user.db.password=${AVNI_DEFAULT_ORG_USER_DB_PASSWORD:password}

0 comments on commit a6c219b

Please sign in to comment.