mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
Fix: RegisterOrganization
This commit is contained in:
28
client/src/store/organization/organization.actions.js
Normal file
28
client/src/store/organization/organization.actions.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import ApiService from 'services/ApiService';
|
||||
|
||||
export const buildTenant = ({ id, token }) => {
|
||||
return (dispatch) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
ApiService.post(`organization/build${token}`, id)
|
||||
.then((response) => {
|
||||
resolve(response);
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error.response.data.errors || []);
|
||||
});
|
||||
});
|
||||
};
|
||||
};
|
||||
export const seedTenant = ({ id, token }) => {
|
||||
return (dispatch) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
ApiService.post(`organization/seed/${token}`, id)
|
||||
.then((response) => {
|
||||
resolve(response);
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error.response.data.errors || []);
|
||||
});
|
||||
});
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user