about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/ui
diff options
context:
space:
mode:
authorcwm <chriswmartin@protonmail.com>2018-01-09 10:51:14 -0600
committercwm <chriswmartin@protonmail.com>2018-01-09 10:51:14 -0600
commitaef4b1af666f3fe66778bff0bab83b780fc71732 (patch)
treea853098e77501f24793fb1b9baaab0181f5730d7 /app/javascript/flavours/glitch/features/ui
parentf43c2f12f38aef0d4a909f6f12968cd7bccfef98 (diff)
Refactor /api/web APIs to use the centralized axios instance (tootsuite pr #6223)
Diffstat (limited to 'app/javascript/flavours/glitch/features/ui')
-rw-r--r--app/javascript/flavours/glitch/features/ui/components/embed_modal.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/features/ui/components/embed_modal.js b/app/javascript/flavours/glitch/features/ui/components/embed_modal.js
index 1afffb51b..f3553f4a9 100644
--- a/app/javascript/flavours/glitch/features/ui/components/embed_modal.js
+++ b/app/javascript/flavours/glitch/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 'flavours/glitch/util/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;