Skip to content

Commit

Permalink
[fix] Transfer the campaignion_organization to the dataset app
Browse files Browse the repository at this point in the history
  • Loading branch information
torotil committed Mar 15, 2023
1 parent b5d9fe7 commit c307b02
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 2 additions & 0 deletions campaignion_email_to_target/datasets_app/src/utils/api.js
Expand Up @@ -2,6 +2,7 @@ import axios from 'axios'

const url = Drupal.settings.campaignion_email_to_target.endpoints['e2t-api'].url + '/'
const datasetQuery = Drupal.settings.campaignion_email_to_target.datasetQuery
const organization = Drupal.settings.campaignion_email_to_target.organization
const headers = {
Authorization: 'Bearer ' + Drupal.settings.campaignion_email_to_target.endpoints['e2t-api'].token
}
Expand Down Expand Up @@ -31,6 +32,7 @@ export default {
* @return {Promise} axios response.
*/
saveDataset (dataset, createNew) {
dataset.organization = organization
return axios({
method: createNew ? 'post' : 'put',
url: createNew ? url : url + dataset.key,
Expand Down

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions campaignion_email_to_target/src/Wizard/TargetStep.php
Expand Up @@ -111,6 +111,7 @@ public function stepForm($form, &$form_state) {
'token' => $this->api->getAccessToken(),
];
$settings['datasetQuery'] = variable_get_value('campaignion_email_to_target_dataset_query');
$settings['organization'] = variable_get_value('campaignion_organization');

$settings = ['campaignion_email_to_target' => $settings];
$dir = drupal_get_path('module', 'campaignion_email_to_target');
Expand Down

0 comments on commit c307b02

Please sign in to comment.