Implement project + remove useless config
This commit is contained in:
@@ -11,8 +11,6 @@ export default class extends Controller {
|
||||
'buildingForm'
|
||||
];
|
||||
|
||||
API_BASE = window.API_CONFIG.dev;
|
||||
|
||||
async submit(event) {
|
||||
event.preventDefault();
|
||||
|
||||
@@ -22,10 +20,7 @@ export default class extends Controller {
|
||||
'POST'
|
||||
);
|
||||
|
||||
const res = await this.send(
|
||||
`${this.API_BASE}/api/buildings`,
|
||||
options
|
||||
);
|
||||
const res = await this.send('/project/create', options);
|
||||
|
||||
if (res.id) {
|
||||
this.buildingTarget.setAttribute('data-id', res.id);
|
||||
|
||||
Reference in New Issue
Block a user