diff --git a/backend/models/configItemsModel.js b/backend/models/configItemsModel.js index 785fea5..3f4ce03 100644 --- a/backend/models/configItemsModel.js +++ b/backend/models/configItemsModel.js @@ -60,8 +60,9 @@ export const getConfigItemByCustomerId = async (customerId, result) => { export const updateConfigItemById = async (data, result) => { const id = data.primaryID; try { - let sql = `UPDATE changedb SET assetName = ?, customerID = ?, customer = ?, location = ?, remoteLocation = ?, type = ?, description = ?, notes = ?, state = ?, lastView = ?, user = ?, hardwareBool = ?, model = ?, serialnumber = ?, CPU = ?, RAM = ?, storageConfiguration = ?, miscellaneous = ?, softwareBool = ?, software = ?, version = ?, networkBool = ?, IPv4 = ?, IPv6 = ?, MAC = ?, subnetmask = ? WHERE primaryID = ?`; + let sql = `UPDATE changedb SET assetName = ?, customerID = ?, customer = ?, location = ?, remoteLocation = ?, type = ?, description = ?, notes = ?, state = ?, lastView = ?, user = ?, hardwareBool = ?, model = ?, serialnumber = ?, CPU = ?, RAM = ?, storageConfiguration = ?, miscellaneous = ?, softwareBool = ?, software = ?, version = ?, license = ?, networkBool = ?, IPv4 = ?, IPv6 = ?, MAC = ?, subnetmask = ? WHERE primaryID = ?`; const results = await ownConn.query(sql, [data.assetName, data.customerID, data.customer, data.location, data.remoteLocation, data.type, data.description, data.notes, data.state, data.lastView, data.user, data.hardwareBool, data.model, data.serialnumber, data.CPU, data.RAM, data.storageConfiguration, data.miscellaneous, data.softwareBool, data.software, data.version, data.license, data.networkBool, data.IPv4, data.IPv6, data.MAC, data.subnetmask, id]); + results.insertId = results.insertId.toString(); result(null, results); } catch (err) { diff --git a/components/server/Asset.vue b/components/server/Asset.vue index 74392d1..a2be70d 100644 --- a/components/server/Asset.vue +++ b/components/server/Asset.vue @@ -1,7 +1,7 @@