Implement project + remove useless config

This commit is contained in:
2025-04-02 17:16:54 +02:00
parent 3422412bbf
commit 34d1506483
18 changed files with 502 additions and 70 deletions

View File

@@ -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);