diff --git a/src/services/tables/assignments.ts b/src/services/tables/assignments.ts index bba6bd0..d909da4 100644 --- a/src/services/tables/assignments.ts +++ b/src/services/tables/assignments.ts @@ -43,7 +43,7 @@ export const getAssignmentById = async ( export const updateAssignment = async ( id: number, name: string, - modelName: string, + model_name: string, port: number, display_order: number ): Promise => { @@ -51,7 +51,7 @@ export const updateAssignment = async ( 'UPDATE assignments SET name = ?, model_name = ?, port = ?, display_order = ? WHERE id = ?'; const result = await pool.query(query, [ name, - modelName, + model_name, port, display_order, id, diff --git a/src/services/tables/gpus.ts b/src/services/tables/gpus.ts index b86d47a..e102085 100644 --- a/src/services/tables/gpus.ts +++ b/src/services/tables/gpus.ts @@ -65,12 +65,12 @@ export const updateGPU = async ( display_order, id, ]); - return Number(result[0].affectedRows); + return Number(result.affectedRows); }; // Delete a GPU export const deleteGPU = async (id: number): Promise => { const query = 'DELETE FROM gpus WHERE id = ?'; const result = await pool.query(query, [id]); - return Number(result[0].affectedRows); + return Number(result.affectedRows); };