Move src to dashboard (#152)
This commit is contained in:
20
app/javascript/dashboard/api/billing.js
Normal file
20
app/javascript/dashboard/api/billing.js
Normal file
@@ -0,0 +1,20 @@
|
||||
/* global axios */
|
||||
|
||||
import endPoints from './endPoints';
|
||||
|
||||
export default {
|
||||
getSubscription() {
|
||||
const urlData = endPoints('subscriptions').get();
|
||||
const fetchPromise = new Promise((resolve, reject) => {
|
||||
axios
|
||||
.get(urlData.url)
|
||||
.then(response => {
|
||||
resolve(response);
|
||||
})
|
||||
.catch(error => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
return fetchPromise;
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user