diff options
author | nightpool <eg1290@gmail.com> | 2018-01-08 14:01:33 -0500 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-01-08 20:01:33 +0100 |
commit | c235711ffee6999c09bd6910373ebcfbc7758e99 (patch) | |
tree | 40efb018ab3fdc58d933d5ef09a95c56f0ef298d /app/javascript/mastodon/features/ui/components/embed_modal.js | |
parent | ff6ca8bdc6e4ae42c571fecbab8ddc8817638c31 (diff) |
Refactor /api/web APIs to use the centralized axios instance (#6223)
Also adds the ability to decouple the centralized axios logic from the state dispatcher
Diffstat (limited to 'app/javascript/mastodon/features/ui/components/embed_modal.js')
-rw-r--r-- | app/javascript/mastodon/features/ui/components/embed_modal.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/mastodon/features/ui/components/embed_modal.js b/app/javascript/mastodon/features/ui/components/embed_modal.js index 1afffb51b..d440a8826 100644 --- a/app/javascript/mastodon/features/ui/components/embed_modal.js +++ b/app/javascript/mastodon/features/ui/components/embed_modal.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { FormattedMessage, injectIntl } from 'react-intl'; -import axios from 'axios'; +import api from '../../../api'; @injectIntl export default class EmbedModal extends ImmutablePureComponent { @@ -23,7 +23,7 @@ export default class EmbedModal extends ImmutablePureComponent { this.setState({ loading: true }); - axios.post('/api/web/embed', { url }).then(res => { + api().post('/api/web/embed', { url }).then(res => { this.setState({ loading: false, oembed: res.data }); const iframeDocument = this.iframe.contentWindow.document; |