diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index abf68533..97982668 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -45,6 +45,9 @@ jobs: target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - name: run mcaptcha cache redis instance + run: docker run -d -p 6379:6379 mcaptcha/cache + - uses: actions/setup-node@v2 with: node-version: '14.x' @@ -65,9 +68,6 @@ jobs: profile: minimal override: true - - name: run mcaptcha cache redis instance - run: docker run -d -p 6379:6379 mcaptcha/cache - - name: Run migrations uses: actions-rs/cargo@v1 with: diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 31fd2807..772e53b8 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -50,6 +50,9 @@ jobs: with: node-version: '14.x' + - name: run mcaptcha cache redis instance + run: docker run -d -p 6379:6379 mcaptcha/cache + - name: Install JavaScript Dependencies run: yarn install @@ -79,9 +82,6 @@ jobs: env: DATABASE_URL: postgres://postgres:password@localhost:5432/postgres - - name: run mcaptcha cache redis instance - run: docker run -d -p 6379:6379 mcaptcha/cache - - name: tests uses: actions-rs/cargo@v1 timeout-minutes: 40 diff --git a/config/default.toml b/config/default.toml index f310bef9..b31c5ed2 100644 --- a/config/default.toml +++ b/config/default.toml @@ -46,5 +46,5 @@ pool = 4 # port = "5432" # username = "batman" # password = "somereallycomplicatedBatmanpassword" -url = "redis://127.0.0.1" +url = "redis://127.0.0.1:6370" pool = 4 diff --git a/src/api/v1/pow/get_config.rs b/src/api/v1/pow/get_config.rs index 971581b0..ed1dc4e4 100644 --- a/src/api/v1/pow/get_config.rs +++ b/src/api/v1/pow/get_config.rs @@ -64,7 +64,6 @@ pub async fn get_config( let payload = payload.into_inner(); match res.exists { Some(true) => { - (); match data.captcha.get_pow(payload.key.clone()).await { Some(config) => Ok(HttpResponse::Ok().json(config)), None => {