Skip to content

Conversation

@amab8901
Copy link
Collaborator

Solves: https://worldmobile.atlassian.net/browse/EN-491

Description:
This code is repeated a large number of times in info.rs and dbsync/api.rs:

        let dp = crate::DataProvider::new(crate::DBSyncProvider::new(crate::Config {
            db_path: dotenv::var("DBSYNC_DB_URL").unwrap(),
        }));

I refactored it into a separate function, and then call that function instead of repeating the same code over and over.

Tests:
Passes all the unit tests that develop branch passes. Also passes Docker integration tests for non-query endpoints (can't test query endpoints in Swagger).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants