Skip to content

Commit

Permalink
rename faqs service
Browse files Browse the repository at this point in the history
  • Loading branch information
pablopareja committed Jul 19, 2019
1 parent b2c612d commit 2ef6613
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion components/admin/faqs/components/actions/DeleteAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';

// Services
import FaqsService from 'services/FaqsService';
import FaqsService from 'services/faqs';
import { toastr } from 'react-redux-toastr';

class DeleteAction extends React.Component {
Expand Down
2 changes: 1 addition & 1 deletion components/admin/faqs/form/FaqsForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Serializer } from 'jsonapi-serializer';
import { toastr } from 'react-redux-toastr';

// Services
import FaqsService from 'services/FaqsService';
import FaqsService from 'services/faqs';

import { STATE_DEFAULT, FORM_ELEMENTS } from 'components/admin/faqs/form/constants';

Expand Down
4 changes: 2 additions & 2 deletions components/modal/subscriptions-modal/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,14 @@ export const getDatasets = createThunkAction('SUBSCRIPTIONS__GET-DATASETS', () =
(dispatch, getState) => {
const { common } = getState();
const { locale } = common;
const dasetService = new DatasetService(null, {
const datasetService = new DatasetService(null, {
apiURL: process.env.WRI_API_URL,
language: locale
});

dispatch(setDatasetsLoading(true));

dasetService.getSubscribableDatasets('metadata')
datasetService.getSubscribableDatasets('metadata')
.then((datasets = []) => {
const parsedDatasets = WRISerializer({ data: datasets });
dispatch(setDatasets(parsedDatasets));
Expand Down
2 changes: 1 addition & 1 deletion redactions/admin/faqs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'isomorphic-fetch';
import FaqsService from 'services/FaqsService';
import FaqsService from 'services/faqs';

/**
* CONSTANTS
Expand Down
1 change: 1 addition & 0 deletions services/DatasetsService.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ class DatasetsService {
application: applications.join(','),
language: this.opts.language,
includes,
env: process.env.API_ENV,
...filters
};

Expand Down
2 changes: 1 addition & 1 deletion services/FaqsService.js → services/faqs.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default class FaqsService {
// GET ALL DATA
fetchAllData() {
return fetch(
`${process.env.WRI_API_URL}/faq/?published=all`,
`${process.env.WRI_API_URL}/faq/?published=all&env=${process.env.API_ENV}&application=${process.env.APPLICATIONS}`,
{ headers: { 'Upgrade-Insecure-Requests': 1 } }

)
Expand Down

0 comments on commit 2ef6613

Please sign in to comment.