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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user