diff --git a/.github/workflows/deploy-to-qaNet.yml b/.github/workflows/deploy-to-qaNet.yml new file mode 100644 index 0000000..a90505a --- /dev/null +++ b/.github/workflows/deploy-to-qaNet.yml @@ -0,0 +1,19 @@ +name: Continuous Deployment to qaNet + +on: + push: + branches: + - QA + +jobs: + deploy: + runs-on: ubuntu-latest + name: Deploy server + steps: + - uses: actions/checkout@v2 + - name: Publish to qaNet + uses: cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CF_API_TOKEN }} + workingDirectory: 'server' + environment: qanet \ No newline at end of file diff --git a/server/src/routes/zt_registration.js b/server/src/routes/zt_registration.js index 2235acf..8ea1a40 100644 --- a/server/src/routes/zt_registration.js +++ b/server/src/routes/zt_registration.js @@ -78,7 +78,7 @@ const cleanUpMembers = (address, apiToken, networkId) => { */ const isVerifiedUser = async (email) => { const mongodbApiKey = await SETTINGS.get('mongodb_api_key') - const mongodbApiUrl = "https://eu-central-1.aws.data.mongodb-api.com/app/data-fcrur/endpoint/data/v1/action/findOne" + const mongodbApiUrl = await SETTINGS.get('mongodb_api_url') let headers = new Headers() headers.append("Content-Type", "application/json") @@ -93,7 +93,7 @@ const isVerifiedUser = async (email) => { } } - let resp = await fetch(mongodbApiUrl, { + let resp = await fetch(`${mongodbApiUrl}/action/findOne`, { headers, method: "POST", body: JSON.stringify(filter) diff --git a/server/wrangler.toml b/server/wrangler.toml index 72a4fd7..dcbd087 100644 --- a/server/wrangler.toml +++ b/server/wrangler.toml @@ -1,6 +1,6 @@ name = "devnet-auth-server" account_id = "18ff2b4e6205b938652998cfca0d8cff" -route = "devnet-auth-server.holo.host/*" +route = "auth-server.dev.holotest.net/*" compatibility_date = "2024-02-19" main = "dist/main.js" kv_namespaces = [ @@ -16,3 +16,10 @@ route = "auth-server.holo.host/*" kv_namespaces = [ { binding = "SETTINGS", id = "56ecfe1cf54d43839e2c867798e5003b"} ] + +[env.qanet] +name = "qa-auth-server" +route = "auth-server.qa.holotest.net/*" +kv_namespaces = [ + { binding = "SETTINGS", id = "1cfdf3a9b75545408f9058d846648349"} +]