Add temporary brand field fix and deployment script

- Add empty brand field to API requests until server is updated
- Create deployment script for updating API server
- This fixes the 500 error when adding/editing filaments
This commit is contained in:
DaX
2025-06-27 01:52:02 +02:00
parent 06025623ff
commit d5ddb5f3df
2 changed files with 43 additions and 2 deletions

View File

@@ -81,7 +81,8 @@ export const filamentService = {
// Transform bojaHex to boja_hex for backend
const data = {
...filament,
boja_hex: filament.bojaHex || filament.boja_hex
boja_hex: filament.bojaHex || filament.boja_hex,
brand: '' // Temporary fix until server is updated
};
delete data.bojaHex; // Remove the frontend field
const response = await api.post('/filaments', data);
@@ -92,7 +93,8 @@ export const filamentService = {
// Transform bojaHex to boja_hex for backend
const data = {
...filament,
boja_hex: filament.bojaHex || filament.boja_hex
boja_hex: filament.bojaHex || filament.boja_hex,
brand: filament.brand || '' // Temporary fix until server is updated
};
delete data.bojaHex; // Remove the frontend field
const response = await api.put(`/filaments/${id}`, data);