Skip to content

Commit

Permalink
Merge branch 'develop-clever' into feat-maintenance-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianGille authored Aug 16, 2024
2 parents f69a3fd + bb8b77a commit dea0911
Show file tree
Hide file tree
Showing 9 changed files with 352 additions and 326 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/ci.yml

This file was deleted.

49 changes: 49 additions & 0 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build

on:
push:
branches: [develop-clever]
pull_request:
branches: [develop-clever]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14.16.0'
cache: 'yarn'
- run: yarn install
- run: yarn build
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14.16.0'
cache: 'yarn'
- run: yarn install
- run: yarn test-ci
deployment:
runs-on: ubuntu-latest
needs: [build, unit-tests]
if: "github.event_name == 'push' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.pull_request.title, '[skip ci]') && !contains(github.event.pull_request.title, '[ci skip]')"
timeout-minutes: 40
env:
NODE_VERSION: 16.17.1
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: 47ng/[email protected]
with:
appID: ${{ secrets.CLEVER_APP_DEVELOP }}
force: true
env:
CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }}
19 changes: 16 additions & 3 deletions packages/server/esp/dsc/dscProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ class DscProvider {

async connectApiCall() {
return axios.get(`${config.dscUrl}`, {
headers: { apiKey: this.apiKey, 'Content-Type': 'application/json' },
headers: {
apiKey: this.apiKey,
'Content-Type': 'application/json',
'User-Agent': config.dscUserAgent,
},
});
}

Expand Down Expand Up @@ -54,6 +58,7 @@ class DscProvider {
headers: {
apiKey: this.apiKey,
'Content-Type': 'application/json',
'User-Agent': config.dscUserAgent,
},
});
}
Expand All @@ -62,7 +67,11 @@ class DscProvider {
const url = `${config.dscUrl}/withTypeCampagne`;
try {
return await axios.post(url, restData, {
headers: { apiKey: this.apiKey, 'Content-Type': 'application/json' },
headers: {
apiKey: this.apiKey,
'Content-Type': 'application/json',
'User-Agent': config.dscUserAgent,
},
params: { typeCampagne },
});
} catch (error) {
Expand All @@ -74,7 +83,11 @@ class DscProvider {
const url = `${config.dscUrl}/withTypeCampagne/${campaignMailId}`;
try {
return await axios.put(url, restData, {
headers: { apiKey: this.apiKey, 'Content-Type': 'application/json' },
headers: {
apiKey: this.apiKey,
'Content-Type': 'application/json',
'User-Agent': config.dscUserAgent,
},
params: { typeCampagne },
});
} catch (error) {
Expand Down
Loading

0 comments on commit dea0911

Please sign in to comment.